Try build and try fix (+AI)
This commit is contained in:
@@ -19,7 +19,15 @@ Write-Host "===================================================" -ForegroundColo
|
||||
Write-Host "2/2 Generating Python and JS Token Sets" -ForegroundColor Cyan
|
||||
Write-Host "===================================================" -ForegroundColor Cyan
|
||||
|
||||
$g4Path = "MathExpr.g4"
|
||||
$scriptRoot = $PSScriptRoot
|
||||
if ([string]::IsNullOrWhiteSpace($scriptRoot)) {
|
||||
$scriptRoot = Split-Path -Parent $PSCommandPath
|
||||
}
|
||||
if ([string]::IsNullOrWhiteSpace($scriptRoot)) {
|
||||
$scriptRoot = (Get-Location).Path
|
||||
}
|
||||
|
||||
$g4Path = Join-Path $scriptRoot "MathExpr.g4"
|
||||
if (-not (Test-Path $g4Path)) {
|
||||
Write-Error "MathExpr.g4 not found!"
|
||||
exit 1
|
||||
@@ -77,6 +85,27 @@ function New-Snippet([string]$name) {
|
||||
return "${name}()"
|
||||
}
|
||||
|
||||
function Get-FunctionNames([hashtable]$lexerMap, [string]$token) {
|
||||
$names = @()
|
||||
if ($lexerMap.ContainsKey($token)) {
|
||||
$rawNames = $lexerMap[$token]
|
||||
foreach ($name in @($rawNames)) {
|
||||
if ($null -eq $name) { continue }
|
||||
if ($name -is [System.Collections.IDictionary]) { continue }
|
||||
$text = [string]$name
|
||||
if ([string]::IsNullOrWhiteSpace($text)) { continue }
|
||||
if ($text -match '^System\.Collections\.') { continue }
|
||||
$names += $text.ToLowerInvariant()
|
||||
}
|
||||
}
|
||||
|
||||
if ($names.Count -eq 0) {
|
||||
$names = @($token.ToLowerInvariant())
|
||||
}
|
||||
|
||||
return $names | Sort-Object -Unique
|
||||
}
|
||||
|
||||
# Pomocná funkce pro vyčištění ANTLR docstringu do jednoho čistého řádku textu
|
||||
function Clean-Docstring([string]$doc) {
|
||||
if ([string]::IsNullOrEmpty($doc)) { return "" }
|
||||
@@ -97,22 +126,23 @@ function Add-FunctionRuleLine([hashtable]$meta, [hashtable]$lexerMap, [string]$l
|
||||
$token = $matches[1]
|
||||
$inner = $matches[2].Trim()
|
||||
$bounds = Get-ArgBounds $inner
|
||||
$names = $lexerMap[$token]
|
||||
if (-not $names) { return }
|
||||
$names = Get-FunctionNames $lexerMap $token
|
||||
if ($names.Count -eq 0) { return }
|
||||
|
||||
$cleanDoc = Clean-Docstring $currentDoc
|
||||
$minArgs = if ($null -eq $bounds.min) { 0 } else { [int]$bounds.min }
|
||||
$maxArgs = $null
|
||||
if ($null -ne $bounds.max) {
|
||||
$maxArgs = [int]$bounds.max
|
||||
}
|
||||
|
||||
foreach ($fn in $names) {
|
||||
$entry = @{
|
||||
minArgs = $bounds.min
|
||||
minArgs = $minArgs
|
||||
snippet = (New-Snippet $fn)
|
||||
description = $cleanDoc
|
||||
}
|
||||
if ($null -eq $bounds.max) {
|
||||
$entry.maxArgs = $null
|
||||
} else {
|
||||
$entry.maxArgs = $bounds.max
|
||||
}
|
||||
$entry.maxArgs = $maxArgs
|
||||
$meta[$fn] = $entry
|
||||
}
|
||||
}
|
||||
@@ -120,6 +150,7 @@ function Add-FunctionRuleLine([hashtable]$meta, [hashtable]$lexerMap, [string]$l
|
||||
function Get-FunctionMeta([string]$grammarText, [hashtable]$lexerMap) {
|
||||
$meta = @{}
|
||||
$inFunc = $false
|
||||
$inDocBlock = $false
|
||||
$currentDoc = ""
|
||||
|
||||
foreach ($line in ($grammarText -split "`r?`n")) {
|
||||
@@ -191,6 +222,7 @@ foreach ($fn in $functions) {
|
||||
minArgs = 1
|
||||
maxArgs = $null
|
||||
snippet = (New-Snippet $fn)
|
||||
description = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +237,7 @@ foreach ($key in $sortedMetaKeys) {
|
||||
$pyMetaLines += " '$key': {'min_args': $($m.minArgs), 'max_args': $maxPart, 'snippet': '$($m.snippet)', 'description': '$($m.description)'},"
|
||||
}
|
||||
|
||||
$pyPath = "inbuilt_symbols.py"
|
||||
$pyPath = Join-Path $scriptRoot "inbuilt_symbols.py"
|
||||
$pyContent = @(
|
||||
"# Generated automatically by compile.ps1. Do not edit.",
|
||||
"INBUILT_KEYWORDS = {" + (($keywords | ForEach-Object { "'$_'" }) -join ", ") + "}",
|
||||
@@ -221,7 +253,7 @@ $pyContent = @(
|
||||
Write-Host "-> Exported Python symbols to root: $pyPath" -ForegroundColor Green
|
||||
|
||||
# 5. JavaScript export
|
||||
$jsDir = "..\..\web"
|
||||
$jsDir = Join-Path $scriptRoot "..\..\web"
|
||||
if (-not (Test-Path $jsDir)) {
|
||||
New-Item -ItemType Directory -Force -Path $jsDir | Out-Null
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -84,153 +84,154 @@ DIST=83
|
||||
REMAP=84
|
||||
COSSIM=85
|
||||
COUNT=86
|
||||
REPEAT=87
|
||||
FLATTEN=88
|
||||
APPEND=89
|
||||
GET_VALUE=90
|
||||
FLOW_APPLY=91
|
||||
BATCH_SHUFFLE=92
|
||||
MOTION_MASK=93
|
||||
FLOW_TO_IMAGE=94
|
||||
FLOW_MAG=95
|
||||
FLOW_ANG=96
|
||||
WHERE=97
|
||||
HISTOGRAM=98
|
||||
OVERLAY=99
|
||||
PAD=100
|
||||
CROSS=101
|
||||
MATMUL=102
|
||||
RIFE=103
|
||||
BNOT=104
|
||||
BITCOUNT=105
|
||||
SHAPE=106
|
||||
BAND=107
|
||||
XOR=108
|
||||
BOR=109
|
||||
TENSOR=110
|
||||
ADD_KEY=111
|
||||
REMOVE_KEY=112
|
||||
PUSH=113
|
||||
POP=114
|
||||
CLEAR=115
|
||||
HAS=116
|
||||
GET=117
|
||||
CONCAT=118
|
||||
INT=119
|
||||
FLOAT=120
|
||||
UPPER=121
|
||||
LOWER=122
|
||||
TRIM=123
|
||||
SPLIT=124
|
||||
JOIN=125
|
||||
SUBSTRING=126
|
||||
FIND=127
|
||||
REPLACE=128
|
||||
DILATE=129
|
||||
ERODE=130
|
||||
MORPH_OPEN=131
|
||||
MORPH_CLOSE=132
|
||||
RGB_TO_OKLAB=133
|
||||
RGB_TO_CIELAB=134
|
||||
OKLAB_TO_RGB=135
|
||||
CIELAB_TO_RGB=136
|
||||
RGB_TO_HSV=137
|
||||
HSV_TO_RGB=138
|
||||
INT_TO_RGB=139
|
||||
RGB_TO_INT=140
|
||||
INTERPOLATE_LINEAR=141
|
||||
INTERPOLATE_AREA=142
|
||||
INTERPOLATE_NEAREST=143
|
||||
TEXT_IMAGE=144
|
||||
AS_NESTED=145
|
||||
SVD=146
|
||||
DIAG=147
|
||||
IF=148
|
||||
ELSE=149
|
||||
WHILE=150
|
||||
FOR=151
|
||||
IN=152
|
||||
BREAK=153
|
||||
CONTINUE=154
|
||||
RETURN=155
|
||||
TIMESTAMP=156
|
||||
SORT=157
|
||||
ARGSORT=158
|
||||
ARGMIN=159
|
||||
ARGMAX=160
|
||||
SOFTMAX=161
|
||||
SOFTMIN=162
|
||||
UNIQUE=163
|
||||
FLIP=164
|
||||
STARTSWITH=165
|
||||
ENDSWITH=166
|
||||
SQUEEZE=167
|
||||
UNSQUEEZE=168
|
||||
ROLL=169
|
||||
COV=170
|
||||
CORR=171
|
||||
ENTROPY=172
|
||||
CROP=173
|
||||
NONE=174
|
||||
COORDS=175
|
||||
NOISE=176
|
||||
RAND=177
|
||||
CAUCHY=178
|
||||
EXPONENTIAL=179
|
||||
LOGNORMAL=180
|
||||
BERNOULLI=181
|
||||
POISSON=182
|
||||
GAMMADIST=183
|
||||
BETADIST=184
|
||||
LAPLACEDIST=185
|
||||
GUMBELDIST=186
|
||||
WEIBULLDIST=187
|
||||
CHI2DIST=188
|
||||
STUDENTTDIST=189
|
||||
PERLIN=190
|
||||
CELLULAR=191
|
||||
PLASMA=192
|
||||
RIDGED=193
|
||||
DOMAIN_WARP=194
|
||||
PLUS=195
|
||||
MINUS=196
|
||||
MULT=197
|
||||
DIV=198
|
||||
MOD=199
|
||||
POW=200
|
||||
LSHIFT=201
|
||||
RSHIFT=202
|
||||
GE=203
|
||||
GT=204
|
||||
LE=205
|
||||
LT=206
|
||||
EQ=207
|
||||
EQUEALS=208
|
||||
PLUS_EQ=209
|
||||
MINUS_EQ=210
|
||||
MULT_EQ=211
|
||||
DIV_EQ=212
|
||||
MOD_EQ=213
|
||||
NE=214
|
||||
PIPE=215
|
||||
LPAREN=216
|
||||
RPAREN=217
|
||||
COMMA=218
|
||||
SEMICOLON=219
|
||||
ARROW=220
|
||||
LBRACKET=221
|
||||
RBRACKET=222
|
||||
QUESTION=223
|
||||
COLON=224
|
||||
LBRACE=225
|
||||
RBRACE=226
|
||||
NUMBER=227
|
||||
CONSTANT=228
|
||||
STRING=229
|
||||
VARIABLE=230
|
||||
SL_COMMENT=231
|
||||
ML_COMMENT=232
|
||||
WS=233
|
||||
KEYS=87
|
||||
REPEAT=88
|
||||
FLATTEN=89
|
||||
APPEND=90
|
||||
GET_VALUE=91
|
||||
FLOW_APPLY=92
|
||||
BATCH_SHUFFLE=93
|
||||
MOTION_MASK=94
|
||||
FLOW_TO_IMAGE=95
|
||||
FLOW_MAG=96
|
||||
FLOW_ANG=97
|
||||
WHERE=98
|
||||
HISTOGRAM=99
|
||||
OVERLAY=100
|
||||
PAD=101
|
||||
CROSS=102
|
||||
MATMUL=103
|
||||
RIFE=104
|
||||
BNOT=105
|
||||
BITCOUNT=106
|
||||
SHAPE=107
|
||||
BAND=108
|
||||
XOR=109
|
||||
BOR=110
|
||||
TENSOR=111
|
||||
ADD_KEY=112
|
||||
REMOVE_KEY=113
|
||||
PUSH=114
|
||||
POP=115
|
||||
CLEAR=116
|
||||
HAS=117
|
||||
GET=118
|
||||
CONCAT=119
|
||||
INT=120
|
||||
FLOAT=121
|
||||
UPPER=122
|
||||
LOWER=123
|
||||
TRIM=124
|
||||
SPLIT=125
|
||||
JOIN=126
|
||||
SUBSTRING=127
|
||||
FIND=128
|
||||
REPLACE=129
|
||||
DILATE=130
|
||||
ERODE=131
|
||||
MORPH_OPEN=132
|
||||
MORPH_CLOSE=133
|
||||
RGB_TO_OKLAB=134
|
||||
RGB_TO_CIELAB=135
|
||||
OKLAB_TO_RGB=136
|
||||
CIELAB_TO_RGB=137
|
||||
RGB_TO_HSV=138
|
||||
HSV_TO_RGB=139
|
||||
INT_TO_RGB=140
|
||||
RGB_TO_INT=141
|
||||
INTERPOLATE_LINEAR=142
|
||||
INTERPOLATE_AREA=143
|
||||
INTERPOLATE_NEAREST=144
|
||||
TEXT_IMAGE=145
|
||||
AS_NESTED=146
|
||||
SVD=147
|
||||
DIAG=148
|
||||
IF=149
|
||||
ELSE=150
|
||||
WHILE=151
|
||||
FOR=152
|
||||
IN=153
|
||||
BREAK=154
|
||||
CONTINUE=155
|
||||
RETURN=156
|
||||
TIMESTAMP=157
|
||||
SORT=158
|
||||
ARGSORT=159
|
||||
ARGMIN=160
|
||||
ARGMAX=161
|
||||
SOFTMAX=162
|
||||
SOFTMIN=163
|
||||
UNIQUE=164
|
||||
FLIP=165
|
||||
STARTSWITH=166
|
||||
ENDSWITH=167
|
||||
SQUEEZE=168
|
||||
UNSQUEEZE=169
|
||||
ROLL=170
|
||||
COV=171
|
||||
CORR=172
|
||||
ENTROPY=173
|
||||
CROP=174
|
||||
NONE=175
|
||||
COORDS=176
|
||||
NOISE=177
|
||||
RAND=178
|
||||
CAUCHY=179
|
||||
EXPONENTIAL=180
|
||||
LOGNORMAL=181
|
||||
BERNOULLI=182
|
||||
POISSON=183
|
||||
GAMMADIST=184
|
||||
BETADIST=185
|
||||
LAPLACEDIST=186
|
||||
GUMBELDIST=187
|
||||
WEIBULLDIST=188
|
||||
CHI2DIST=189
|
||||
STUDENTTDIST=190
|
||||
PERLIN=191
|
||||
CELLULAR=192
|
||||
PLASMA=193
|
||||
RIDGED=194
|
||||
DOMAIN_WARP=195
|
||||
PLUS=196
|
||||
MINUS=197
|
||||
MULT=198
|
||||
DIV=199
|
||||
MOD=200
|
||||
POW=201
|
||||
LSHIFT=202
|
||||
RSHIFT=203
|
||||
GE=204
|
||||
GT=205
|
||||
LE=206
|
||||
LT=207
|
||||
EQ=208
|
||||
EQUEALS=209
|
||||
PLUS_EQ=210
|
||||
MINUS_EQ=211
|
||||
MULT_EQ=212
|
||||
DIV_EQ=213
|
||||
MOD_EQ=214
|
||||
NE=215
|
||||
PIPE=216
|
||||
LPAREN=217
|
||||
RPAREN=218
|
||||
COMMA=219
|
||||
SEMICOLON=220
|
||||
ARROW=221
|
||||
LBRACKET=222
|
||||
RBRACKET=223
|
||||
QUESTION=224
|
||||
COLON=225
|
||||
LBRACE=226
|
||||
RBRACE=227
|
||||
NUMBER=228
|
||||
CONSTANT=229
|
||||
STRING=230
|
||||
VARIABLE=231
|
||||
SL_COMMENT=232
|
||||
ML_COMMENT=233
|
||||
WS=234
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -300,105 +301,106 @@ WS=233
|
||||
'cumprod'=76
|
||||
'smootherstep'=82
|
||||
'remap'=84
|
||||
'repeat'=87
|
||||
'flatten'=88
|
||||
'append'=89
|
||||
'get_value'=90
|
||||
'flow_apply'=91
|
||||
'motion_mask'=93
|
||||
'flow_to_image'=94
|
||||
'where'=97
|
||||
'overlay'=99
|
||||
'pad'=100
|
||||
'cross'=101
|
||||
'matmul'=102
|
||||
'rife'=103
|
||||
'shape'=106
|
||||
'tensor'=110
|
||||
'add_key'=111
|
||||
'stack_push'=113
|
||||
'stack_pop'=114
|
||||
'stack_clear'=115
|
||||
'stack_has'=116
|
||||
'stack_get'=117
|
||||
'int'=119
|
||||
'float'=120
|
||||
'upper'=121
|
||||
'lower'=122
|
||||
'trim'=123
|
||||
'split'=124
|
||||
'join'=125
|
||||
'find'=127
|
||||
'replace'=128
|
||||
'dilate'=129
|
||||
'erode'=130
|
||||
'morph_open'=131
|
||||
'morph_close'=132
|
||||
'rgb_to_oklab'=133
|
||||
'rgb_to_cielab'=134
|
||||
'oklab_to_rgb'=135
|
||||
'cielab_to_rgb'=136
|
||||
'rgb_to_hsv'=137
|
||||
'hsv_to_rgb'=138
|
||||
'int_to_rgb'=139
|
||||
'rgb_to_int'=140
|
||||
'interpolate_linear'=141
|
||||
'interpolate_area'=142
|
||||
'text_image'=144
|
||||
'as_nested_tensor'=145
|
||||
'if'=148
|
||||
'else'=149
|
||||
'while'=150
|
||||
'for'=151
|
||||
'in'=152
|
||||
'break'=153
|
||||
'continue'=154
|
||||
'return'=155
|
||||
'sort'=157
|
||||
'argsort'=158
|
||||
'argmin'=159
|
||||
'argmax'=160
|
||||
'softmax'=161
|
||||
'softmin'=162
|
||||
'unique'=163
|
||||
'flip'=164
|
||||
'startswith'=165
|
||||
'endswith'=166
|
||||
'squeeze'=167
|
||||
'unsqueeze'=168
|
||||
'roll'=169
|
||||
'cov'=170
|
||||
'entropy'=172
|
||||
'crop'=173
|
||||
'+'=195
|
||||
'-'=196
|
||||
'*'=197
|
||||
'/'=198
|
||||
'%'=199
|
||||
'^'=200
|
||||
'<<'=201
|
||||
'>>'=202
|
||||
'>='=203
|
||||
'>'=204
|
||||
'<='=205
|
||||
'<'=206
|
||||
'=='=207
|
||||
'='=208
|
||||
'+='=209
|
||||
'-='=210
|
||||
'*='=211
|
||||
'/='=212
|
||||
'%='=213
|
||||
'!='=214
|
||||
'|'=215
|
||||
'('=216
|
||||
')'=217
|
||||
','=218
|
||||
';'=219
|
||||
'->'=220
|
||||
'['=221
|
||||
']'=222
|
||||
'?'=223
|
||||
':'=224
|
||||
'{'=225
|
||||
'}'=226
|
||||
'keys'=87
|
||||
'repeat'=88
|
||||
'flatten'=89
|
||||
'append'=90
|
||||
'get_value'=91
|
||||
'flow_apply'=92
|
||||
'motion_mask'=94
|
||||
'flow_to_image'=95
|
||||
'where'=98
|
||||
'overlay'=100
|
||||
'pad'=101
|
||||
'cross'=102
|
||||
'matmul'=103
|
||||
'rife'=104
|
||||
'shape'=107
|
||||
'tensor'=111
|
||||
'add_key'=112
|
||||
'stack_push'=114
|
||||
'stack_pop'=115
|
||||
'stack_clear'=116
|
||||
'stack_has'=117
|
||||
'stack_get'=118
|
||||
'int'=120
|
||||
'float'=121
|
||||
'upper'=122
|
||||
'lower'=123
|
||||
'trim'=124
|
||||
'split'=125
|
||||
'join'=126
|
||||
'find'=128
|
||||
'replace'=129
|
||||
'dilate'=130
|
||||
'erode'=131
|
||||
'morph_open'=132
|
||||
'morph_close'=133
|
||||
'rgb_to_oklab'=134
|
||||
'rgb_to_cielab'=135
|
||||
'oklab_to_rgb'=136
|
||||
'cielab_to_rgb'=137
|
||||
'rgb_to_hsv'=138
|
||||
'hsv_to_rgb'=139
|
||||
'int_to_rgb'=140
|
||||
'rgb_to_int'=141
|
||||
'interpolate_linear'=142
|
||||
'interpolate_area'=143
|
||||
'text_image'=145
|
||||
'as_nested_tensor'=146
|
||||
'if'=149
|
||||
'else'=150
|
||||
'while'=151
|
||||
'for'=152
|
||||
'in'=153
|
||||
'break'=154
|
||||
'continue'=155
|
||||
'return'=156
|
||||
'sort'=158
|
||||
'argsort'=159
|
||||
'argmin'=160
|
||||
'argmax'=161
|
||||
'softmax'=162
|
||||
'softmin'=163
|
||||
'unique'=164
|
||||
'flip'=165
|
||||
'startswith'=166
|
||||
'endswith'=167
|
||||
'squeeze'=168
|
||||
'unsqueeze'=169
|
||||
'roll'=170
|
||||
'cov'=171
|
||||
'entropy'=173
|
||||
'crop'=174
|
||||
'+'=196
|
||||
'-'=197
|
||||
'*'=198
|
||||
'/'=199
|
||||
'%'=200
|
||||
'^'=201
|
||||
'<<'=202
|
||||
'>>'=203
|
||||
'>='=204
|
||||
'>'=205
|
||||
'<='=206
|
||||
'<'=207
|
||||
'=='=208
|
||||
'='=209
|
||||
'+='=210
|
||||
'-='=211
|
||||
'*='=212
|
||||
'/='=213
|
||||
'%='=214
|
||||
'!='=215
|
||||
'|'=216
|
||||
'('=217
|
||||
')'=218
|
||||
','=219
|
||||
';'=220
|
||||
'->'=221
|
||||
'['=222
|
||||
']'=223
|
||||
'?'=224
|
||||
':'=225
|
||||
'{'=226
|
||||
'}'=227
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1175
-1171
File diff suppressed because it is too large
Load Diff
@@ -84,153 +84,154 @@ DIST=83
|
||||
REMAP=84
|
||||
COSSIM=85
|
||||
COUNT=86
|
||||
REPEAT=87
|
||||
FLATTEN=88
|
||||
APPEND=89
|
||||
GET_VALUE=90
|
||||
FLOW_APPLY=91
|
||||
BATCH_SHUFFLE=92
|
||||
MOTION_MASK=93
|
||||
FLOW_TO_IMAGE=94
|
||||
FLOW_MAG=95
|
||||
FLOW_ANG=96
|
||||
WHERE=97
|
||||
HISTOGRAM=98
|
||||
OVERLAY=99
|
||||
PAD=100
|
||||
CROSS=101
|
||||
MATMUL=102
|
||||
RIFE=103
|
||||
BNOT=104
|
||||
BITCOUNT=105
|
||||
SHAPE=106
|
||||
BAND=107
|
||||
XOR=108
|
||||
BOR=109
|
||||
TENSOR=110
|
||||
ADD_KEY=111
|
||||
REMOVE_KEY=112
|
||||
PUSH=113
|
||||
POP=114
|
||||
CLEAR=115
|
||||
HAS=116
|
||||
GET=117
|
||||
CONCAT=118
|
||||
INT=119
|
||||
FLOAT=120
|
||||
UPPER=121
|
||||
LOWER=122
|
||||
TRIM=123
|
||||
SPLIT=124
|
||||
JOIN=125
|
||||
SUBSTRING=126
|
||||
FIND=127
|
||||
REPLACE=128
|
||||
DILATE=129
|
||||
ERODE=130
|
||||
MORPH_OPEN=131
|
||||
MORPH_CLOSE=132
|
||||
RGB_TO_OKLAB=133
|
||||
RGB_TO_CIELAB=134
|
||||
OKLAB_TO_RGB=135
|
||||
CIELAB_TO_RGB=136
|
||||
RGB_TO_HSV=137
|
||||
HSV_TO_RGB=138
|
||||
INT_TO_RGB=139
|
||||
RGB_TO_INT=140
|
||||
INTERPOLATE_LINEAR=141
|
||||
INTERPOLATE_AREA=142
|
||||
INTERPOLATE_NEAREST=143
|
||||
TEXT_IMAGE=144
|
||||
AS_NESTED=145
|
||||
SVD=146
|
||||
DIAG=147
|
||||
IF=148
|
||||
ELSE=149
|
||||
WHILE=150
|
||||
FOR=151
|
||||
IN=152
|
||||
BREAK=153
|
||||
CONTINUE=154
|
||||
RETURN=155
|
||||
TIMESTAMP=156
|
||||
SORT=157
|
||||
ARGSORT=158
|
||||
ARGMIN=159
|
||||
ARGMAX=160
|
||||
SOFTMAX=161
|
||||
SOFTMIN=162
|
||||
UNIQUE=163
|
||||
FLIP=164
|
||||
STARTSWITH=165
|
||||
ENDSWITH=166
|
||||
SQUEEZE=167
|
||||
UNSQUEEZE=168
|
||||
ROLL=169
|
||||
COV=170
|
||||
CORR=171
|
||||
ENTROPY=172
|
||||
CROP=173
|
||||
NONE=174
|
||||
COORDS=175
|
||||
NOISE=176
|
||||
RAND=177
|
||||
CAUCHY=178
|
||||
EXPONENTIAL=179
|
||||
LOGNORMAL=180
|
||||
BERNOULLI=181
|
||||
POISSON=182
|
||||
GAMMADIST=183
|
||||
BETADIST=184
|
||||
LAPLACEDIST=185
|
||||
GUMBELDIST=186
|
||||
WEIBULLDIST=187
|
||||
CHI2DIST=188
|
||||
STUDENTTDIST=189
|
||||
PERLIN=190
|
||||
CELLULAR=191
|
||||
PLASMA=192
|
||||
RIDGED=193
|
||||
DOMAIN_WARP=194
|
||||
PLUS=195
|
||||
MINUS=196
|
||||
MULT=197
|
||||
DIV=198
|
||||
MOD=199
|
||||
POW=200
|
||||
LSHIFT=201
|
||||
RSHIFT=202
|
||||
GE=203
|
||||
GT=204
|
||||
LE=205
|
||||
LT=206
|
||||
EQ=207
|
||||
EQUEALS=208
|
||||
PLUS_EQ=209
|
||||
MINUS_EQ=210
|
||||
MULT_EQ=211
|
||||
DIV_EQ=212
|
||||
MOD_EQ=213
|
||||
NE=214
|
||||
PIPE=215
|
||||
LPAREN=216
|
||||
RPAREN=217
|
||||
COMMA=218
|
||||
SEMICOLON=219
|
||||
ARROW=220
|
||||
LBRACKET=221
|
||||
RBRACKET=222
|
||||
QUESTION=223
|
||||
COLON=224
|
||||
LBRACE=225
|
||||
RBRACE=226
|
||||
NUMBER=227
|
||||
CONSTANT=228
|
||||
STRING=229
|
||||
VARIABLE=230
|
||||
SL_COMMENT=231
|
||||
ML_COMMENT=232
|
||||
WS=233
|
||||
KEYS=87
|
||||
REPEAT=88
|
||||
FLATTEN=89
|
||||
APPEND=90
|
||||
GET_VALUE=91
|
||||
FLOW_APPLY=92
|
||||
BATCH_SHUFFLE=93
|
||||
MOTION_MASK=94
|
||||
FLOW_TO_IMAGE=95
|
||||
FLOW_MAG=96
|
||||
FLOW_ANG=97
|
||||
WHERE=98
|
||||
HISTOGRAM=99
|
||||
OVERLAY=100
|
||||
PAD=101
|
||||
CROSS=102
|
||||
MATMUL=103
|
||||
RIFE=104
|
||||
BNOT=105
|
||||
BITCOUNT=106
|
||||
SHAPE=107
|
||||
BAND=108
|
||||
XOR=109
|
||||
BOR=110
|
||||
TENSOR=111
|
||||
ADD_KEY=112
|
||||
REMOVE_KEY=113
|
||||
PUSH=114
|
||||
POP=115
|
||||
CLEAR=116
|
||||
HAS=117
|
||||
GET=118
|
||||
CONCAT=119
|
||||
INT=120
|
||||
FLOAT=121
|
||||
UPPER=122
|
||||
LOWER=123
|
||||
TRIM=124
|
||||
SPLIT=125
|
||||
JOIN=126
|
||||
SUBSTRING=127
|
||||
FIND=128
|
||||
REPLACE=129
|
||||
DILATE=130
|
||||
ERODE=131
|
||||
MORPH_OPEN=132
|
||||
MORPH_CLOSE=133
|
||||
RGB_TO_OKLAB=134
|
||||
RGB_TO_CIELAB=135
|
||||
OKLAB_TO_RGB=136
|
||||
CIELAB_TO_RGB=137
|
||||
RGB_TO_HSV=138
|
||||
HSV_TO_RGB=139
|
||||
INT_TO_RGB=140
|
||||
RGB_TO_INT=141
|
||||
INTERPOLATE_LINEAR=142
|
||||
INTERPOLATE_AREA=143
|
||||
INTERPOLATE_NEAREST=144
|
||||
TEXT_IMAGE=145
|
||||
AS_NESTED=146
|
||||
SVD=147
|
||||
DIAG=148
|
||||
IF=149
|
||||
ELSE=150
|
||||
WHILE=151
|
||||
FOR=152
|
||||
IN=153
|
||||
BREAK=154
|
||||
CONTINUE=155
|
||||
RETURN=156
|
||||
TIMESTAMP=157
|
||||
SORT=158
|
||||
ARGSORT=159
|
||||
ARGMIN=160
|
||||
ARGMAX=161
|
||||
SOFTMAX=162
|
||||
SOFTMIN=163
|
||||
UNIQUE=164
|
||||
FLIP=165
|
||||
STARTSWITH=166
|
||||
ENDSWITH=167
|
||||
SQUEEZE=168
|
||||
UNSQUEEZE=169
|
||||
ROLL=170
|
||||
COV=171
|
||||
CORR=172
|
||||
ENTROPY=173
|
||||
CROP=174
|
||||
NONE=175
|
||||
COORDS=176
|
||||
NOISE=177
|
||||
RAND=178
|
||||
CAUCHY=179
|
||||
EXPONENTIAL=180
|
||||
LOGNORMAL=181
|
||||
BERNOULLI=182
|
||||
POISSON=183
|
||||
GAMMADIST=184
|
||||
BETADIST=185
|
||||
LAPLACEDIST=186
|
||||
GUMBELDIST=187
|
||||
WEIBULLDIST=188
|
||||
CHI2DIST=189
|
||||
STUDENTTDIST=190
|
||||
PERLIN=191
|
||||
CELLULAR=192
|
||||
PLASMA=193
|
||||
RIDGED=194
|
||||
DOMAIN_WARP=195
|
||||
PLUS=196
|
||||
MINUS=197
|
||||
MULT=198
|
||||
DIV=199
|
||||
MOD=200
|
||||
POW=201
|
||||
LSHIFT=202
|
||||
RSHIFT=203
|
||||
GE=204
|
||||
GT=205
|
||||
LE=206
|
||||
LT=207
|
||||
EQ=208
|
||||
EQUEALS=209
|
||||
PLUS_EQ=210
|
||||
MINUS_EQ=211
|
||||
MULT_EQ=212
|
||||
DIV_EQ=213
|
||||
MOD_EQ=214
|
||||
NE=215
|
||||
PIPE=216
|
||||
LPAREN=217
|
||||
RPAREN=218
|
||||
COMMA=219
|
||||
SEMICOLON=220
|
||||
ARROW=221
|
||||
LBRACKET=222
|
||||
RBRACKET=223
|
||||
QUESTION=224
|
||||
COLON=225
|
||||
LBRACE=226
|
||||
RBRACE=227
|
||||
NUMBER=228
|
||||
CONSTANT=229
|
||||
STRING=230
|
||||
VARIABLE=231
|
||||
SL_COMMENT=232
|
||||
ML_COMMENT=233
|
||||
WS=234
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -300,105 +301,106 @@ WS=233
|
||||
'cumprod'=76
|
||||
'smootherstep'=82
|
||||
'remap'=84
|
||||
'repeat'=87
|
||||
'flatten'=88
|
||||
'append'=89
|
||||
'get_value'=90
|
||||
'flow_apply'=91
|
||||
'motion_mask'=93
|
||||
'flow_to_image'=94
|
||||
'where'=97
|
||||
'overlay'=99
|
||||
'pad'=100
|
||||
'cross'=101
|
||||
'matmul'=102
|
||||
'rife'=103
|
||||
'shape'=106
|
||||
'tensor'=110
|
||||
'add_key'=111
|
||||
'stack_push'=113
|
||||
'stack_pop'=114
|
||||
'stack_clear'=115
|
||||
'stack_has'=116
|
||||
'stack_get'=117
|
||||
'int'=119
|
||||
'float'=120
|
||||
'upper'=121
|
||||
'lower'=122
|
||||
'trim'=123
|
||||
'split'=124
|
||||
'join'=125
|
||||
'find'=127
|
||||
'replace'=128
|
||||
'dilate'=129
|
||||
'erode'=130
|
||||
'morph_open'=131
|
||||
'morph_close'=132
|
||||
'rgb_to_oklab'=133
|
||||
'rgb_to_cielab'=134
|
||||
'oklab_to_rgb'=135
|
||||
'cielab_to_rgb'=136
|
||||
'rgb_to_hsv'=137
|
||||
'hsv_to_rgb'=138
|
||||
'int_to_rgb'=139
|
||||
'rgb_to_int'=140
|
||||
'interpolate_linear'=141
|
||||
'interpolate_area'=142
|
||||
'text_image'=144
|
||||
'as_nested_tensor'=145
|
||||
'if'=148
|
||||
'else'=149
|
||||
'while'=150
|
||||
'for'=151
|
||||
'in'=152
|
||||
'break'=153
|
||||
'continue'=154
|
||||
'return'=155
|
||||
'sort'=157
|
||||
'argsort'=158
|
||||
'argmin'=159
|
||||
'argmax'=160
|
||||
'softmax'=161
|
||||
'softmin'=162
|
||||
'unique'=163
|
||||
'flip'=164
|
||||
'startswith'=165
|
||||
'endswith'=166
|
||||
'squeeze'=167
|
||||
'unsqueeze'=168
|
||||
'roll'=169
|
||||
'cov'=170
|
||||
'entropy'=172
|
||||
'crop'=173
|
||||
'+'=195
|
||||
'-'=196
|
||||
'*'=197
|
||||
'/'=198
|
||||
'%'=199
|
||||
'^'=200
|
||||
'<<'=201
|
||||
'>>'=202
|
||||
'>='=203
|
||||
'>'=204
|
||||
'<='=205
|
||||
'<'=206
|
||||
'=='=207
|
||||
'='=208
|
||||
'+='=209
|
||||
'-='=210
|
||||
'*='=211
|
||||
'/='=212
|
||||
'%='=213
|
||||
'!='=214
|
||||
'|'=215
|
||||
'('=216
|
||||
')'=217
|
||||
','=218
|
||||
';'=219
|
||||
'->'=220
|
||||
'['=221
|
||||
']'=222
|
||||
'?'=223
|
||||
':'=224
|
||||
'{'=225
|
||||
'}'=226
|
||||
'keys'=87
|
||||
'repeat'=88
|
||||
'flatten'=89
|
||||
'append'=90
|
||||
'get_value'=91
|
||||
'flow_apply'=92
|
||||
'motion_mask'=94
|
||||
'flow_to_image'=95
|
||||
'where'=98
|
||||
'overlay'=100
|
||||
'pad'=101
|
||||
'cross'=102
|
||||
'matmul'=103
|
||||
'rife'=104
|
||||
'shape'=107
|
||||
'tensor'=111
|
||||
'add_key'=112
|
||||
'stack_push'=114
|
||||
'stack_pop'=115
|
||||
'stack_clear'=116
|
||||
'stack_has'=117
|
||||
'stack_get'=118
|
||||
'int'=120
|
||||
'float'=121
|
||||
'upper'=122
|
||||
'lower'=123
|
||||
'trim'=124
|
||||
'split'=125
|
||||
'join'=126
|
||||
'find'=128
|
||||
'replace'=129
|
||||
'dilate'=130
|
||||
'erode'=131
|
||||
'morph_open'=132
|
||||
'morph_close'=133
|
||||
'rgb_to_oklab'=134
|
||||
'rgb_to_cielab'=135
|
||||
'oklab_to_rgb'=136
|
||||
'cielab_to_rgb'=137
|
||||
'rgb_to_hsv'=138
|
||||
'hsv_to_rgb'=139
|
||||
'int_to_rgb'=140
|
||||
'rgb_to_int'=141
|
||||
'interpolate_linear'=142
|
||||
'interpolate_area'=143
|
||||
'text_image'=145
|
||||
'as_nested_tensor'=146
|
||||
'if'=149
|
||||
'else'=150
|
||||
'while'=151
|
||||
'for'=152
|
||||
'in'=153
|
||||
'break'=154
|
||||
'continue'=155
|
||||
'return'=156
|
||||
'sort'=158
|
||||
'argsort'=159
|
||||
'argmin'=160
|
||||
'argmax'=161
|
||||
'softmax'=162
|
||||
'softmin'=163
|
||||
'unique'=164
|
||||
'flip'=165
|
||||
'startswith'=166
|
||||
'endswith'=167
|
||||
'squeeze'=168
|
||||
'unsqueeze'=169
|
||||
'roll'=170
|
||||
'cov'=171
|
||||
'entropy'=173
|
||||
'crop'=174
|
||||
'+'=196
|
||||
'-'=197
|
||||
'*'=198
|
||||
'/'=199
|
||||
'%'=200
|
||||
'^'=201
|
||||
'<<'=202
|
||||
'>>'=203
|
||||
'>='=204
|
||||
'>'=205
|
||||
'<='=206
|
||||
'<'=207
|
||||
'=='=208
|
||||
'='=209
|
||||
'+='=210
|
||||
'-='=211
|
||||
'*='=212
|
||||
'/='=213
|
||||
'%='=214
|
||||
'!='=215
|
||||
'|'=216
|
||||
'('=217
|
||||
')'=218
|
||||
','=219
|
||||
';'=220
|
||||
'->'=221
|
||||
'['=222
|
||||
']'=223
|
||||
'?'=224
|
||||
':'=225
|
||||
'{'=226
|
||||
'}'=227
|
||||
|
||||
@@ -1124,6 +1124,15 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#KeysFunc.
|
||||
def enterKeysFunc(self, ctx:MathExprParser.KeysFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#KeysFunc.
|
||||
def exitKeysFunc(self, ctx:MathExprParser.KeysFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#RepeatFunc.
|
||||
def enterRepeatFunc(self, ctx:MathExprParser.RepeatFuncContext):
|
||||
pass
|
||||
|
||||
+2690
-2643
File diff suppressed because it is too large
Load Diff
@@ -629,6 +629,11 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#KeysFunc.
|
||||
def visitKeysFunc(self, ctx:MathExprParser.KeysFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#RepeatFunc.
|
||||
def visitRepeatFunc(self, ctx:MathExprParser.RepeatFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
@@ -6,260 +6,9 @@ INBUILT_CONSTANTS = {
|
||||
'e', 'pi'
|
||||
}
|
||||
INBUILT_FUNCTIONS = {
|
||||
'abs', 'acos', 'acosh', 'add_key', 'all', 'angle', 'any', 'append', 'argmax', 'argmin', 'argsort', 'as_nested_tensor', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'band', 'batch_shuffle', 'bitcount', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'blur', 'bnot', 'bor', 'botk', 'botk_ind', 'botk_indices', 'bxor', 'cat', 'ceil', 'cellular', 'cellular_noise', 'cielab_to_rgb', 'clamp', 'cnt', 'concat', 'concatenate', 'conv', 'convolution', 'coordinates', 'coords', 'corr', 'correlation', 'cos', 'cosh', 'cosine_similarity', 'cossim', 'count', 'cov', 'crop', 'cross', 'cubic', 'cubic_ease', 'cumprod', 'cumsum', 'diag', 'diagonal_matrix', 'dilate', 'dist', 'distance', 'domain_warp', 'domain_warp_noise', 'dot', 'edge', 'elastic', 'elastic_ease', 'endswith', 'entropy', 'erf', 'erfinv', 'erode', 'exp', 'ezconv', 'ezconvolution', 'fft', 'find', 'flatten', 'flip', 'float', 'floor', 'flow_ang', 'flow_angle', 'flow_apply', 'flow_mag', 'flow_magnitude', 'flow_to_image', 'fract', 'gamma', 'gaussian', 'gelu', 'get_value', 'hist', 'histogram', 'hsv_to_rgb', 'ifft', 'int', 'int_to_rgb', 'interpolate_area', 'interpolate_linear', 'interpolate_nearest', 'interpolate_nearest_exact', 'join', 'length', 'lerp', 'linspace', 'ln', 'log', 'logspace', 'lower', 'map', 'matmul', 'mean', 'median', 'mode', 'moment', 'morph_close', 'morph_open', 'motion_mask', 'nan_to_num', 'noise', 'now', 'nvl', 'oklab_to_rgb', 'overlay', 'pad', 'percentile', 'perlin', 'perlin_noise', 'perm', 'permute', 'pinv', 'plasma', 'plasma_noise', 'popcnt', 'popcount', 'pow', 'prcnt', 'print', 'print_shape', 'pshp', 'quantile', 'quartil', 'quartile', 'rand', 'randb', 'randbeta', 'randc', 'rande', 'randg', 'randgumbel', 'randchi2', 'randl', 'randln', 'randn', 'random_bernoulli', 'random_beta', 'random_cauchy', 'random_exponential', 'random_gamma', 'random_gumbel', 'random_chi2', 'random_laplace', 'random_log_normal', 'random_normal', 'random_poisson', 'random_studentt', 'random_uniform', 'random_weibull', 'randp', 'randt', 'randu', 'randw', 'range', 'relu', 'remap', 'remove_key', 'repeat', 'replace', 'reshape', 'rgb_to_cielab', 'rgb_to_hsv', 'rgb_to_int', 'rgb_to_oklab', 'ridged', 'ridged_noise', 'rife', 'rm_kay', 'roll', 'round', 'rshp', 'select', 'shape', 'shuffle', 'sigm', 'sign', 'sin', 'sine', 'sine_ease', 'singular_value_decomposition', 'sinh', 'smax', 'smin', 'smootherstep', 'smoothstep', 'snorm', 'softmax', 'softmin', 'softplus', 'sort', 'split', 'sqrt', 'squeeze', 'stack_clear', 'stack_get', 'stack_has', 'stack_pop', 'stack_push', 'startswith', 'std', 'step', 'substr', 'substring', 'sum', 'svd', 'swap', 'tan', 'tanh', 'tensor', 'text_image', 'timestamp', 'tmax', 'tmin', 'tnorm', 'topk', 'topk_ind', 'topk_indices', 'trim', 'turbulence', 'unique', 'unsqueeze', 'upper', 'var', 'voronoi', 'voronoi_noise', 'where', 'worley'
|
||||
'abs', 'acos', 'acosh', 'add_key', 'all', 'angle', 'any', 'append', 'argmax', 'argmin', 'argsort', 'as_nested_tensor', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'band', 'batch_shuffle', 'bitcount', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'blur', 'bnot', 'bor', 'botk', 'botk_ind', 'botk_indices', 'bxor', 'cat', 'ceil', 'cellular', 'cellular_noise', 'cielab_to_rgb', 'clamp', 'cnt', 'concat', 'concatenate', 'conv', 'convolution', 'coordinates', 'coords', 'corr', 'correlation', 'cos', 'cosh', 'cosine_similarity', 'cossim', 'count', 'cov', 'crop', 'cross', 'cubic', 'cubic_ease', 'cumprod', 'cumsum', 'diag', 'diagonal_matrix', 'dilate', 'dist', 'distance', 'domain_warp', 'domain_warp_noise', 'dot', 'edge', 'elastic', 'elastic_ease', 'endswith', 'entropy', 'erf', 'erfinv', 'erode', 'exp', 'ezconv', 'ezconvolution', 'fft', 'find', 'flatten', 'flip', 'float', 'floor', 'flow_ang', 'flow_angle', 'flow_apply', 'flow_mag', 'flow_magnitude', 'flow_to_image', 'fract', 'gamma', 'gaussian', 'gelu', 'get_value', 'hist', 'histogram', 'hsv_to_rgb', 'ifft', 'int', 'int_to_rgb', 'interpolate_area', 'interpolate_linear', 'interpolate_nearest', 'interpolate_nearest_exact', 'join', 'keys', 'length', 'lerp', 'linspace', 'ln', 'log', 'logspace', 'lower', 'map', 'matmul', 'mean', 'median', 'mode', 'moment', 'morph_close', 'morph_open', 'motion_mask', 'nan_to_num', 'noise', 'now', 'nvl', 'oklab_to_rgb', 'overlay', 'pad', 'percentile', 'perlin', 'perlin_noise', 'perm', 'permute', 'pinv', 'plasma', 'plasma_noise', 'popcnt', 'popcount', 'pow', 'prcnt', 'print', 'print_shape', 'pshp', 'quantile', 'quartil', 'quartile', 'rand', 'randb', 'randbeta', 'randc', 'rande', 'randg', 'randgumbel', 'randchi2', 'randl', 'randln', 'randn', 'random_bernoulli', 'random_beta', 'random_cauchy', 'random_exponential', 'random_gamma', 'random_gumbel', 'random_chi2', 'random_laplace', 'random_log_normal', 'random_normal', 'random_poisson', 'random_studentt', 'random_uniform', 'random_weibull', 'randp', 'randt', 'randu', 'randw', 'range', 'relu', 'remap', 'remove_key', 'repeat', 'replace', 'reshape', 'rgb_to_cielab', 'rgb_to_hsv', 'rgb_to_int', 'rgb_to_oklab', 'ridged', 'ridged_noise', 'rife', 'rm_kay', 'roll', 'round', 'rshp', 'select', 'shape', 'shuffle', 'sigm', 'sign', 'sin', 'sine', 'sine_ease', 'singular_value_decomposition', 'sinh', 'smax', 'smin', 'smootherstep', 'smoothstep', 'snorm', 'softmax', 'softmin', 'softplus', 'sort', 'split', 'sqrt', 'squeeze', 'stack_clear', 'stack_get', 'stack_has', 'stack_pop', 'stack_push', 'startswith', 'std', 'step', 'substr', 'substring', 'sum', 'svd', 'swap', 'tan', 'tanh', 'tensor', 'text_image', 'timestamp', 'tmax', 'tmin', 'tnorm', 'topk', 'topk_ind', 'topk_indices', 'trim', 'turbulence', 'unique', 'unsqueeze', 'upper', 'var', 'voronoi', 'voronoi_noise', 'where', 'worley'
|
||||
}
|
||||
|
||||
INBUILT_FUNCTIONS.add('keys')
|
||||
|
||||
INBUILT_FUNCTION_META = {
|
||||
'abs': {'min_args': 1, 'max_args': 1, 'snippet': 'abs()', 'description': 'abs(x) - applies per element absolute value function. Same as |x| for numbers.'},
|
||||
'acos': {'min_args': 1, 'max_args': 1, 'snippet': 'acos()', 'description': 'acos(x) - applies arcus cosinus function to value or each element of value'},
|
||||
'acosh': {'min_args': 1, 'max_args': 1, 'snippet': 'acosh()', 'description': 'acosh(x) - applies hyperbolic arcus cosinus function to value or each element of value'},
|
||||
'add_key': {'min_args': 3, 'max_args': 3, 'snippet': 'add_key()', 'description': 'add_key(dict, key, value) - adds or replaces a dictionary entry and returns the updated dictionary'},
|
||||
'all': {'min_args': 1, 'max_args': 1, 'snippet': 'all()', 'description': 'all(x) - returns 1 if all elements of x are non-zero otherwise 0'},
|
||||
'angle': {'min_args': 1, 'max_args': 1, 'snippet': 'angle()', 'description': 'angle(x) - returns the angle of a complex number or vector'},
|
||||
'any': {'min_args': 1, 'max_args': 1, 'snippet': 'any()', 'description': 'any(x) - returns 1 if any element of x is non-zero otherwise 0'},
|
||||
'append': {'min_args': 2, 'max_args': 2, 'snippet': 'append()', 'description': 'append(x, y) - appends y to the end of x. If inputs are tensors use concatenate(x,...,dim)'},
|
||||
'argmax': {'min_args': 1, 'max_args': 2, 'snippet': 'argmax()', 'description': 'argmax(x, [as_position]) - returns the maximum position in flattened x or coordinates as a list when requested'},
|
||||
'argmin': {'min_args': 1, 'max_args': 2, 'snippet': 'argmin()', 'description': 'argmin(x, [as_position]) - returns the minimum position in flattened x or coordinates as a list when requested'},
|
||||
'argsort': {'min_args': 2, 'max_args': 3, 'snippet': 'argsort()', 'description': 'argsort(x, [desc], [dim]) - returns the indices that would sort x. desc defaults to ascending and dim defaults to the last dimension.'},
|
||||
'as_nested_tensor': {'min_args': 1, 'max_args': 1, 'snippet': 'as_nested_tensor()', 'description': 'as_nested(x) - converts a list to a nested tensor (special object containing tensors of different shapes behaving like a tensor)'},
|
||||
'asin': {'min_args': 1, 'max_args': 1, 'snippet': 'asin()', 'description': 'asin(x) - applies arcus sinus function to value or each element of value'},
|
||||
'asinh': {'min_args': 1, 'max_args': 1, 'snippet': 'asinh()', 'description': 'asinh(x) - applies hyperbolic arcus sinus function to value or each element of value'},
|
||||
'atan': {'min_args': 1, 'max_args': 1, 'snippet': 'atan()', 'description': 'atan(x) - applies arcus tangents function to value or each element of value'},
|
||||
'atan2': {'min_args': 2, 'max_args': 2, 'snippet': 'atan2()', 'description': 'atan2(y, x) - computes the arc tangent of y/x, using the signs of both arguments to determine the quadrant'},
|
||||
'atanh': {'min_args': 1, 'max_args': 1, 'snippet': 'atanh()', 'description': 'atanh(x) - applies hyperbolic arcus tangents function to value or each element of value'},
|
||||
'band': {'min_args': 2, 'max_args': 2, 'snippet': 'band()', 'description': 'bitwise_and(x, y) - computes the element-wise bitwise AND of x and y'},
|
||||
'batch_shuffle': {'min_args': 2, 'max_args': 2, 'snippet': 'batch_shuffle()', 'description': 'batch_shuffle(x, indices) - shuffles and duplicates or skips the batch dimension of x according to indices'},
|
||||
'bitcount': {'min_args': 1, 'max_args': 1, 'snippet': 'bitcount()', 'description': 'bitcount(x) - returns the number of set bits'},
|
||||
'bitwise_and': {'min_args': 2, 'max_args': 2, 'snippet': 'bitwise_and()', 'description': 'bitwise_and(x, y) - computes the element-wise bitwise AND of x and y'},
|
||||
'bitwise_not': {'min_args': 1, 'max_args': 1, 'snippet': 'bitwise_not()', 'description': 'bnot(x) - computes the bitwise NOT'},
|
||||
'bitwise_or': {'min_args': 2, 'max_args': 2, 'snippet': 'bitwise_or()', 'description': 'bitwise_or(x, y) - computes the element-wise bitwise OR of x and y'},
|
||||
'bitwise_xor': {'min_args': 2, 'max_args': 2, 'snippet': 'bitwise_xor()', 'description': 'bitwise_xor(x, y) - computes the element-wise bitwise XOR of x and y'},
|
||||
'blur': {'min_args': 2, 'max_args': 3, 'snippet': 'blur()', 'description': 'gaussian(x, sigma, [reshape]) - applies a Gaussian blur to x with specified sigma. if reshape has value of 1.0, then it tries orienting the input such that channel is in the direction of filter. Otherwise it expect color dimension to be the last.'},
|
||||
'bnot': {'min_args': 1, 'max_args': 1, 'snippet': 'bnot()', 'description': 'bnot(x) - computes the bitwise NOT'},
|
||||
'bor': {'min_args': 2, 'max_args': 2, 'snippet': 'bor()', 'description': 'bitwise_or(x, y) - computes the element-wise bitwise OR of x and y'},
|
||||
'botk': {'min_args': 2, 'max_args': 2, 'snippet': 'botk()', 'description': 'botk(x, k) - returns the k smallest elements of x. For tensors it keeps them in place.'},
|
||||
'botk_ind': {'min_args': 2, 'max_args': 2, 'snippet': 'botk_ind()', 'description': 'botk_indices(x, k) - returns the indices of the k smallest elements of x'},
|
||||
'botk_indices': {'min_args': 2, 'max_args': 2, 'snippet': 'botk_indices()', 'description': 'botk_indices(x, k) - returns the indices of the k smallest elements of x'},
|
||||
'bxor': {'min_args': 2, 'max_args': 2, 'snippet': 'bxor()', 'description': 'bitwise_xor(x, y) - computes the element-wise bitwise XOR of x and y'},
|
||||
'cat': {'min_args': 2, 'max_args': None, 'snippet': 'cat()', 'description': 'concatenate(x1, x2, ..., dim) - concatenates tensors along the specified dimension'},
|
||||
'ceil': {'min_args': 1, 'max_args': 1, 'snippet': 'ceil()', 'description': 'ceil(x) - returns the smallest integer greater than or equal to x'},
|
||||
'cellular': {'min_args': 2, 'max_args': 5, 'snippet': 'cellular()', 'description': 'cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise'},
|
||||
'cellular_noise': {'min_args': 2, 'max_args': 5, 'snippet': 'cellular_noise()', 'description': 'cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise'},
|
||||
'cielab_to_rgb': {'min_args': 1, 'max_args': 3, 'snippet': 'cielab_to_rgb()', 'description': 'cielab_to_rgb(cielab) / cielab_to_rgb(l, a, b) - converts CIELAB to RGB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting.'},
|
||||
'clamp': {'min_args': 3, 'max_args': 3, 'snippet': 'clamp()', 'description': 'clamp(x, min, max) - clamps x between min and max per element'},
|
||||
'cnt': {'min_args': 1, 'max_args': 1, 'snippet': 'cnt()', 'description': 'count(x) - returns the number of elements in x'},
|
||||
'concat': {'min_args': 2, 'max_args': None, 'snippet': 'concat()', 'description': 'concatenate(x1, x2, ..., dim) - concatenates tensors along the specified dimension'},
|
||||
'concatenate': {'min_args': 2, 'max_args': None, 'snippet': 'concatenate()', 'description': 'concatenate(x1, x2, ..., dim) - concatenates tensors along the specified dimension'},
|
||||
'conv': {'min_args': 2, 'max_args': None, 'snippet': 'conv()', 'description': 'convolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Expects [batch,channel, ...]'},
|
||||
'convolution': {'min_args': 2, 'max_args': None, 'snippet': 'convolution()', 'description': 'convolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Expects [batch,channel, ...]'},
|
||||
'coordinates': {'min_args': 2, 'max_args': 3, 'snippet': 'coordinates()', 'description': 'coords(shape, dim, [dtype]) - generates a tensor with the specified shape whose values are the coordinates of each element along the specified dimension. The dtype can be specified to control the data type of the output tensor.'},
|
||||
'coords': {'min_args': 2, 'max_args': 3, 'snippet': 'coords()', 'description': 'coords(shape, dim, [dtype]) - generates a tensor with the specified shape whose values are the coordinates of each element along the specified dimension. The dtype can be specified to control the data type of the output tensor.'},
|
||||
'corr': {'min_args': 2, 'max_args': 2, 'snippet': 'corr()', 'description': 'correlation(x, y) - computes the correlation between x and y'},
|
||||
'correlation': {'min_args': 2, 'max_args': 2, 'snippet': 'correlation()', 'description': 'correlation(x, y) - computes the correlation between x and y'},
|
||||
'cos': {'min_args': 1, 'max_args': 1, 'snippet': 'cos()', 'description': 'cos(x) - applies cosinus function to value or each element of value'},
|
||||
'cosh': {'min_args': 1, 'max_args': 1, 'snippet': 'cosh()', 'description': 'cosh(x) - applies hyperbolic cosinus function to value or each element of value'},
|
||||
'cosine_similarity': {'min_args': 2, 'max_args': 2, 'snippet': 'cosine_similarity()', 'description': 'cosine_similarity(x, y) - computes the cosine similarity between x and y.'},
|
||||
'cossim': {'min_args': 2, 'max_args': 2, 'snippet': 'cossim()', 'description': 'cosine_similarity(x, y) - computes the cosine similarity between x and y.'},
|
||||
'count': {'min_args': 1, 'max_args': 1, 'snippet': 'count()', 'description': 'count(x) - returns the number of elements in x'},
|
||||
'keys': {'min_args': 1, 'max_args': 1, 'snippet': 'keys()', 'description': 'keys(x) - returns dictionary keys in insertion order'},
|
||||
'cov': {'min_args': 2, 'max_args': 2, 'snippet': 'cov()', 'description': 'cov(x, y) - computes the covariance matrix of x and y'},
|
||||
'crop': {'min_args': 3, 'max_args': 3, 'snippet': 'crop()', 'description': 'crop(x, start, size) - crops tensor x. Take size and begin at start. start should be the low corner. The result is at most size (if size is bigger then rest of tensor).'},
|
||||
'cross': {'min_args': 2, 'max_args': 2, 'snippet': 'cross()', 'description': 'cross(x, y) - computes the cross product of x and y. Last dimension must be 3'},
|
||||
'cubic': {'min_args': 3, 'max_args': 3, 'snippet': 'cubic()', 'description': 'cubic_ease(a, b, t) - cubic ease between a and b'},
|
||||
'cubic_ease': {'min_args': 3, 'max_args': 3, 'snippet': 'cubic_ease()', 'description': 'cubic_ease(a, b, t) - cubic ease between a and b'},
|
||||
'cumprod': {'min_args': 1, 'max_args': 1, 'snippet': 'cumprod()', 'description': 'cumprod(x) - computes the cumulative product over first dimension.'},
|
||||
'cumsum': {'min_args': 1, 'max_args': 2, 'snippet': 'cumsum()', 'description': 'cumsum(x, [dim]) - computes the cumulative sum, defaulting to the first dimension.'},
|
||||
'diag': {'min_args': 4, 'max_args': 5, 'snippet': 'diag()', 'description': 'diagonal_matrix(x, shape, [offset], [dim1], [dim2]) - creates a diagonal matrix from x with specified shape. offset is the diagonal offset. dim1 and dim2 are the dimensions to place the diagonal on.'},
|
||||
'diagonal_matrix': {'min_args': 4, 'max_args': 5, 'snippet': 'diagonal_matrix()', 'description': 'diagonal_matrix(x, shape, [offset], [dim1], [dim2]) - creates a diagonal matrix from x with specified shape. offset is the diagonal offset. dim1 and dim2 are the dimensions to place the diagonal on.'},
|
||||
'dilate': {'min_args': 1, 'max_args': 2, 'snippet': 'dilate()', 'description': 'dilate(x, [kernel]) - applies dilation to x. kernel is optional.'},
|
||||
'dist': {'min_args': 4, 'max_args': 4, 'snippet': 'dist()', 'description': 'distance(x1, y1, x2, y2) - computes Euclidean distance between (x1, y1) and (x2, y2)'},
|
||||
'distance': {'min_args': 4, 'max_args': 4, 'snippet': 'distance()', 'description': 'distance(x1, y1, x2, y2) - computes Euclidean distance between (x1, y1) and (x2, y2)'},
|
||||
'domain_warp': {'min_args': 4, 'max_args': 8, 'snippet': 'domain_warp()', 'description': 'domain_warp_noise(seed, scale, warp_scale, warp_strength, [octaves], [warp_octaves], [offset], [shape]) - generates domain warped noise'},
|
||||
'domain_warp_noise': {'min_args': 4, 'max_args': 8, 'snippet': 'domain_warp_noise()', 'description': 'domain_warp_noise(seed, scale, warp_scale, warp_strength, [octaves], [warp_octaves], [offset], [shape]) - generates domain warped noise'},
|
||||
'dot': {'min_args': 2, 'max_args': 2, 'snippet': 'dot()', 'description': 'dot(x, y) - computes the dot product of x and y. Last dimension must be 3.'},
|
||||
'edge': {'min_args': 1, 'max_args': 2, 'snippet': 'edge()', 'description': 'edge(x, [matrix_size]) - detects edges in x. Matrix size denotes the size of edge detection matrix.'},
|
||||
'elastic': {'min_args': 3, 'max_args': 3, 'snippet': 'elastic()', 'description': 'elastic_ease(a, b, t) - elastic ease between a and b'},
|
||||
'elastic_ease': {'min_args': 3, 'max_args': 3, 'snippet': 'elastic_ease()', 'description': 'elastic_ease(a, b, t) - elastic ease between a and b'},
|
||||
'endswith': {'min_args': 2, 'max_args': 2, 'snippet': 'endswith()', 'description': 'endswith(text, suffix) - returns 1 if text ends with suffix, else 0'},
|
||||
'entropy': {'min_args': 1, 'max_args': 1, 'snippet': 'entropy()', 'description': 'entropy(x) - computes shanon entropy'},
|
||||
'erf': {'min_args': 1, 'max_args': 1, 'snippet': 'erf()', 'description': 'erf(x) - computes the error function (torch.erf)'},
|
||||
'erfinv': {'min_args': 1, 'max_args': 1, 'snippet': 'erfinv()', 'description': 'erfinv(x) - computes the inverse error function (torch.erfinv)'},
|
||||
'erode': {'min_args': 1, 'max_args': 2, 'snippet': 'erode()', 'description': 'erode(x, [kernel]) - applies erosion to x. kernel is size of used matrix.'},
|
||||
'exp': {'min_args': 1, 'max_args': 1, 'snippet': 'exp()', 'description': 'exp(x) - applies e^x to value (per element)'},
|
||||
'ezconv': {'min_args': 2, 'max_args': None, 'snippet': 'ezconv()', 'description': 'ezconvolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Attempts to correctly convolve over size dimensions.'},
|
||||
'ezconvolution': {'min_args': 2, 'max_args': None, 'snippet': 'ezconvolution()', 'description': 'ezconvolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Attempts to correctly convolve over size dimensions.'},
|
||||
'fft': {'min_args': 1, 'max_args': 1, 'snippet': 'fft()', 'description': 'fft(x) - computes fast Fourier transform of x'},
|
||||
'find': {'min_args': 2, 'max_args': 2, 'snippet': 'find()', 'description': 'find(s, sub) - returns the index of the first occurrence of sub in s. -1 if not found. Works only for strings.'},
|
||||
'flatten': {'min_args': 1, 'max_args': 1, 'snippet': 'flatten()', 'description': 'flatten(x) - flattens tensor into a 1D tensor'},
|
||||
'flip': {'min_args': 2, 'max_args': 2, 'snippet': 'flip()', 'description': 'flip(x, dims) - reverses the order of elements along the specified dimensions. Works also for text and list with dims=0'},
|
||||
'float': {'min_args': 1, 'max_args': 1, 'snippet': 'float()', 'description': 'float(x) - casts x to float'},
|
||||
'floor': {'min_args': 1, 'max_args': 1, 'snippet': 'floor()', 'description': 'floor(x) - returns the largest integer less than or equal to x'},
|
||||
'flow_ang': {'min_args': 1, 'max_args': 1, 'snippet': 'flow_ang()', 'description': 'flow_angle(x) - computes the angle of optical flow (basically angle() but real and imaginery is separate in 2 dimensions)'},
|
||||
'flow_angle': {'min_args': 1, 'max_args': 1, 'snippet': 'flow_angle()', 'description': 'flow_angle(x) - computes the angle of optical flow (basically angle() but real and imaginery is separate in 2 dimensions)'},
|
||||
'flow_apply': {'min_args': 2, 'max_args': 2, 'snippet': 'flow_apply()', 'description': 'flow_apply(image, flow) - applies optical flow to an image'},
|
||||
'flow_mag': {'min_args': 1, 'max_args': 1, 'snippet': 'flow_mag()', 'description': 'flow_magnitude(x) - computes the magnitude of optical flow (or any other structure with last dimension of 2)'},
|
||||
'flow_magnitude': {'min_args': 1, 'max_args': 1, 'snippet': 'flow_magnitude()', 'description': 'flow_magnitude(x) - computes the magnitude of optical flow (or any other structure with last dimension of 2)'},
|
||||
'flow_to_image': {'min_args': 1, 'max_args': 1, 'snippet': 'flow_to_image()', 'description': 'flow_to_image(x) - converts optical flow x to an RGB image. Up-Down is blue-yellow Left-right green-magenta.'},
|
||||
'fract': {'min_args': 1, 'max_args': 1, 'snippet': 'fract()', 'description': 'fract(x) - returns the fractional part of x: x - floor(x)'},
|
||||
'gamma': {'min_args': 1, 'max_args': 1, 'snippet': 'gamma()', 'description': 'gamma(x) - computes the gamma function (per element)'},
|
||||
'gaussian': {'min_args': 2, 'max_args': 3, 'snippet': 'gaussian()', 'description': 'gaussian(x, sigma, [reshape]) - applies a Gaussian blur to x with specified sigma. if reshape has value of 1.0, then it tries orienting the input such that channel is in the direction of filter. Otherwise it expect color dimension to be the last.'},
|
||||
'gelu': {'min_args': 1, 'max_args': 1, 'snippet': 'gelu()', 'description': 'gelu(x) - applies the Gaussian Error Linear Unit (GELU) activation function'},
|
||||
'get_value': {'min_args': 2, 'max_args': 2, 'snippet': 'get_value()', 'description': 'get_value(slot) - returns the value at slot from stack'},
|
||||
'hist': {'min_args': 4, 'max_args': 4, 'snippet': 'hist()', 'description': 'histogram(x, bins, min, max) - computes histogram'},
|
||||
'histogram': {'min_args': 4, 'max_args': 4, 'snippet': 'histogram()', 'description': 'histogram(x, bins, min, max) - computes histogram'},
|
||||
'hsv_to_rgb': {'min_args': 1, 'max_args': 4, 'snippet': 'hsv_to_rgb()', 'description': 'hsv_to_rgb(hsv, [degrees]) / hsv_to_rgb(h, s, v, [degrees]) - converts HSV to RGB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting.'},
|
||||
'ifft': {'min_args': 1, 'max_args': 2, 'snippet': 'ifft()', 'description': 'ifft(x, [axis]) - inverse fast Fourier transform'},
|
||||
'int': {'min_args': 1, 'max_args': 1, 'snippet': 'int()', 'description': 'int(x) - casts x to integer'},
|
||||
'int_to_rgb': {'min_args': 1, 'max_args': 1, 'snippet': 'int_to_rgb()', 'description': 'int_to_rgb(val) - converts an integer to an RGB color. If input is tensor it stacks the resulting R, G and B tensors using last dimension. If It is list, List of lists is returned and if value, 3 long list is returned.'},
|
||||
'interpolate_area': {'min_args': 2, 'max_args': 2, 'snippet': 'interpolate_area()', 'description': 'interpolate_area(x, y) - performs area interpolation X. Assumes that dim 0 is batch and dim 1 = channel'},
|
||||
'interpolate_linear': {'min_args': 2, 'max_args': 2, 'snippet': 'interpolate_linear()', 'description': 'interpolate_linear(x, y) - performs linear interpolation on X. Assumes that dim 0 is batch and dim 1 = channel'},
|
||||
'interpolate_nearest': {'min_args': 2, 'max_args': 2, 'snippet': 'interpolate_nearest()', 'description': 'interpolate_nearest_exact(x, y) - performs nearest neighbor interpolation X. Assumes that dim 0 is batch and dim 1 = channel'},
|
||||
'interpolate_nearest_exact': {'min_args': 2, 'max_args': 2, 'snippet': 'interpolate_nearest_exact()', 'description': 'interpolate_nearest_exact(x, y) - performs nearest neighbor interpolation X. Assumes that dim 0 is batch and dim 1 = channel'},
|
||||
'join': {'min_args': 1, 'max_args': 2, 'snippet': 'join()', 'description': 'join(x, [separator]) - joins strings in list using separator. Defalut separator is \"\". If you want to join tensors use concatinate(...)'},
|
||||
'length': {'min_args': 1, 'max_args': 1, 'snippet': 'length()', 'description': 'count(x) - returns the number of elements in x'},
|
||||
'lerp': {'min_args': 3, 'max_args': 3, 'snippet': 'lerp()', 'description': 'lerp(a, b, t) - linear interpolation between a and b by t per element. t can be float or tensor.'},
|
||||
'linspace': {'min_args': 3, 'max_args': 3, 'snippet': 'linspace()', 'description': 'linspace(start, stop, num) - creates num linearly spaced values from start to stop (inclusive). Use range if you want to control the step between values.'},
|
||||
'ln': {'min_args': 1, 'max_args': 1, 'snippet': 'ln()', 'description': 'ln(x) - applies natural logarithm to value (per element). Negative numbers return NaN (not a number)'},
|
||||
'log': {'min_args': 1, 'max_args': 1, 'snippet': 'log()', 'description': 'log(x) - applies base 10 logarithm to value (per element). Negative numbers return NaN (not a number)'},
|
||||
'logspace': {'min_args': 4, 'max_args': 4, 'snippet': 'logspace()', 'description': 'logspace(start, stop, num, base) - creates logarithmically spaced values'},
|
||||
'lower': {'min_args': 1, 'max_args': 1, 'snippet': 'lower()', 'description': 'lower(x) - converts string to lowercase'},
|
||||
'map': {'min_args': 2, 'max_args': None, 'snippet': 'map()', 'description': 'map(tensor, coord1, [coord2], [coord3]) - samples/remaps input tensor using coordinates'},
|
||||
'matmul': {'min_args': 2, 'max_args': 2, 'snippet': 'matmul()', 'description': 'matmul(x, y) - computes the matrix multiplication of x and y'},
|
||||
'mean': {'min_args': 1, 'max_args': 1, 'snippet': 'mean()', 'description': 'mean(x) - computes the arithmetic mean of elements of x'},
|
||||
'median': {'min_args': 1, 'max_args': 1, 'snippet': 'median()', 'description': 'median(x) - computes the median of elements of x'},
|
||||
'mode': {'min_args': 1, 'max_args': 1, 'snippet': 'mode()', 'description': 'mode(x) - computes the mode of elements of x'},
|
||||
'moment': {'min_args': 3, 'max_args': 3, 'snippet': 'moment()', 'description': 'moment(x, a, k) - computes the k-th moment of x around a'},
|
||||
'morph_close': {'min_args': 1, 'max_args': 2, 'snippet': 'morph_close()', 'description': 'morph_close(x, [kernel]) - applies morphological closing to x. kernel is size of used matrix.'},
|
||||
'morph_open': {'min_args': 1, 'max_args': 2, 'snippet': 'morph_open()', 'description': 'morph_open(x, [kernel]) - applies morphological opening to x. kernel is size of used matrix.'},
|
||||
'motion_mask': {'min_args': 1, 'max_args': 1, 'snippet': 'motion_mask()', 'description': 'motion_mask(x) - generates a motion mask from optical flow'},
|
||||
'nan_to_num': {'min_args': 4, 'max_args': 4, 'snippet': 'nan_to_num()', 'description': 'nan_to_num(x, nan, pos_inf, neg_inf) - null value replacement - inspired by NVL'},
|
||||
'noise': {'min_args': 1, 'max_args': 2, 'snippet': 'noise()', 'description': 'random_normal(seed, [shape]) - generates normally distributed random noise'},
|
||||
'now': {'min_args': 0, 'max_args': 0, 'snippet': 'now()', 'description': 'timestamp() - returns the current system timestamp'},
|
||||
'nvl': {'min_args': 4, 'max_args': 4, 'snippet': 'nvl()', 'description': 'nan_to_num(x, nan, pos_inf, neg_inf) - null value replacement - inspired by NVL'},
|
||||
'oklab_to_rgb': {'min_args': 1, 'max_args': 3, 'snippet': 'oklab_to_rgb()', 'description': 'oklab_to_rgb(oklab) / oklab_to_rgb(l, a, b) - converts OKLab to RGB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting.'},
|
||||
'overlay': {'min_args': 3, 'max_args': 4, 'snippet': 'overlay()', 'description': 'overlay(base, overlay, offset, [opacity]) - overlays overlay on base at offset. Opacity controls blending. It can be tensor or float. If it is tensor it should be the same shape as overlay.'},
|
||||
'pad': {'min_args': 2, 'max_args': 2, 'snippet': 'pad()', 'description': 'pad(x, padding) - pads tensor x with specified padding (dim 0 neg, dim 0 pos, dim 1 ...)'},
|
||||
'percentile': {'min_args': 2, 'max_args': 2, 'snippet': 'percentile()', 'description': 'percentile(x, p) - computes the p-th percentile of x'},
|
||||
'perlin': {'min_args': 2, 'max_args': 5, 'snippet': 'perlin()', 'description': 'perlin_noise(seed, scale, [octaves], [offset], [shape]) - generates Perlin noise'},
|
||||
'perlin_noise': {'min_args': 2, 'max_args': 5, 'snippet': 'perlin_noise()', 'description': 'perlin_noise(seed, scale, [octaves], [offset], [shape]) - generates Perlin noise'},
|
||||
'perm': {'min_args': 2, 'max_args': 2, 'snippet': 'perm()', 'description': 'permute(x, dims) - permutes the dimensions of tensor x according to dims'},
|
||||
'permute': {'min_args': 2, 'max_args': 2, 'snippet': 'permute()', 'description': 'permute(x, dims) - permutes the dimensions of tensor x according to dims'},
|
||||
'pinv': {'min_args': 1, 'max_args': 1, 'snippet': 'pinv()', 'description': 'pinv(x) - computes the permutative inverse of a list x (list must have uniqe elements) -- TODO: CHECK --'},
|
||||
'plasma': {'min_args': 2, 'max_args': 5, 'snippet': 'plasma()', 'description': 'plasma_noise(seed, scale, [octaves], [offset], [shape]) - generates Plasma/Turbulence noise - same as perlin but default octaves 4'},
|
||||
'plasma_noise': {'min_args': 2, 'max_args': 5, 'snippet': 'plasma_noise()', 'description': 'plasma_noise(seed, scale, [octaves], [offset], [shape]) - generates Plasma/Turbulence noise - same as perlin but default octaves 4'},
|
||||
'popcnt': {'min_args': 1, 'max_args': 1, 'snippet': 'popcnt()', 'description': 'bitcount(x) - returns the number of set bits'},
|
||||
'popcount': {'min_args': 1, 'max_args': 1, 'snippet': 'popcount()', 'description': 'bitcount(x) - returns the number of set bits'},
|
||||
'pow': {'min_args': 2, 'max_args': 2, 'snippet': 'pow()', 'description': 'pow(x, y) - computes x raised to the power of y'},
|
||||
'prcnt': {'min_args': 2, 'max_args': 2, 'snippet': 'prcnt()', 'description': 'percentile(x, p) - computes the p-th percentile of x'},
|
||||
'print': {'min_args': 1, 'max_args': 1, 'snippet': 'print()', 'description': 'print(x) - prints the value of x to the console while passing output unchanged'},
|
||||
'print_shape': {'min_args': 1, 'max_args': 1, 'snippet': 'print_shape()', 'description': 'print_shape(x) - prints the shape of the tensor x'},
|
||||
'pshp': {'min_args': 1, 'max_args': 1, 'snippet': 'pshp()', 'description': 'print_shape(x) - prints the shape of the tensor x'},
|
||||
'quantile': {'min_args': 2, 'max_args': 2, 'snippet': 'quantile()', 'description': 'quantile(x, q) - computes the q-th quantile of x'},
|
||||
'quartil': {'min_args': 2, 'max_args': 2, 'snippet': 'quartil()', 'description': 'quartile(x, q) - computes the q-th quartile of x'},
|
||||
'quartile': {'min_args': 2, 'max_args': 2, 'snippet': 'quartile()', 'description': 'quartile(x, q) - computes the q-th quartile of x'},
|
||||
'rand': {'min_args': 1, 'max_args': 2, 'snippet': 'rand()', 'description': 'random_uniform(seed, [shape]) - generates uniformly distributed random noise'},
|
||||
'randb': {'min_args': 2, 'max_args': 3, 'snippet': 'randb()', 'description': 'random_bernoulli(seed, probability, [shape]) - generates Bernoulli distributed random values (0 or 1). Probability can be a tensor'},
|
||||
'randbeta': {'min_args': 3, 'max_args': 4, 'snippet': 'randbeta()', 'description': 'random_beta(seed, alpha, beta, [shape]) - generates Beta distributed random values'},
|
||||
'randc': {'min_args': 3, 'max_args': 4, 'snippet': 'randc()', 'description': 'random_cauchy(seed, median, sigma, [shape]) - generates Cauchy distributed random values.'},
|
||||
'rande': {'min_args': 2, 'max_args': 3, 'snippet': 'rande()', 'description': 'random_exponential(seed, lambda, [shape]) - generates exponentially distributed random values'},
|
||||
'randg': {'min_args': 3, 'max_args': 4, 'snippet': 'randg()', 'description': 'random_gamma(seed, shape_param, scale, [shape]) - generates Gamma distributed random values.'},
|
||||
'randgumbel': {'min_args': 3, 'max_args': 4, 'snippet': 'randgumbel()', 'description': 'random_gumbel(seed, loc, scale, [shape]) - generates Gumbel distributed random values'},
|
||||
'randchi2': {'min_args': 2, 'max_args': 3, 'snippet': 'randchi2()', 'description': 'random_chi2(seed, df, [shape]) - generates Chi-squared distributed random values'},
|
||||
'randl': {'min_args': 3, 'max_args': 4, 'snippet': 'randl()', 'description': 'random_laplace(seed, loc, scale, [shape]) - generates Laplace distributed random values'},
|
||||
'randln': {'min_args': 3, 'max_args': 4, 'snippet': 'randln()', 'description': 'random_log_normal(seed, mean, std, [shape]) - generates log-normally distributed random values.'},
|
||||
'randn': {'min_args': 1, 'max_args': 2, 'snippet': 'randn()', 'description': 'random_normal(seed, [shape]) - generates normally distributed random noise'},
|
||||
'random_bernoulli': {'min_args': 2, 'max_args': 3, 'snippet': 'random_bernoulli()', 'description': 'random_bernoulli(seed, probability, [shape]) - generates Bernoulli distributed random values (0 or 1). Probability can be a tensor'},
|
||||
'random_beta': {'min_args': 3, 'max_args': 4, 'snippet': 'random_beta()', 'description': 'random_beta(seed, alpha, beta, [shape]) - generates Beta distributed random values'},
|
||||
'random_cauchy': {'min_args': 3, 'max_args': 4, 'snippet': 'random_cauchy()', 'description': 'random_cauchy(seed, median, sigma, [shape]) - generates Cauchy distributed random values.'},
|
||||
'random_exponential': {'min_args': 2, 'max_args': 3, 'snippet': 'random_exponential()', 'description': 'random_exponential(seed, lambda, [shape]) - generates exponentially distributed random values'},
|
||||
'random_gamma': {'min_args': 3, 'max_args': 4, 'snippet': 'random_gamma()', 'description': 'random_gamma(seed, shape_param, scale, [shape]) - generates Gamma distributed random values.'},
|
||||
'random_gumbel': {'min_args': 3, 'max_args': 4, 'snippet': 'random_gumbel()', 'description': 'random_gumbel(seed, loc, scale, [shape]) - generates Gumbel distributed random values'},
|
||||
'random_chi2': {'min_args': 2, 'max_args': 3, 'snippet': 'random_chi2()', 'description': 'random_chi2(seed, df, [shape]) - generates Chi-squared distributed random values'},
|
||||
'random_laplace': {'min_args': 3, 'max_args': 4, 'snippet': 'random_laplace()', 'description': 'random_laplace(seed, loc, scale, [shape]) - generates Laplace distributed random values'},
|
||||
'random_log_normal': {'min_args': 3, 'max_args': 4, 'snippet': 'random_log_normal()', 'description': 'random_log_normal(seed, mean, std, [shape]) - generates log-normally distributed random values.'},
|
||||
'random_normal': {'min_args': 1, 'max_args': 2, 'snippet': 'random_normal()', 'description': 'random_normal(seed, [shape]) - generates normally distributed random noise'},
|
||||
'random_poisson': {'min_args': 2, 'max_args': 3, 'snippet': 'random_poisson()', 'description': 'random_poisson(seed, lambda, [shape]) - generates Poisson distributed random values.'},
|
||||
'random_studentt': {'min_args': 2, 'max_args': 3, 'snippet': 'random_studentt()', 'description': 'random_studentt(seed, df, [shape]) - generates Student-t distributed random values'},
|
||||
'random_uniform': {'min_args': 1, 'max_args': 2, 'snippet': 'random_uniform()', 'description': 'random_uniform(seed, [shape]) - generates uniformly distributed random noise'},
|
||||
'random_weibull': {'min_args': 3, 'max_args': 4, 'snippet': 'random_weibull()', 'description': 'random_weibull(seed, scale, concentration, [shape]) - generates Weibull distributed random values'},
|
||||
'randp': {'min_args': 2, 'max_args': 3, 'snippet': 'randp()', 'description': 'random_poisson(seed, lambda, [shape]) - generates Poisson distributed random values.'},
|
||||
'randt': {'min_args': 2, 'max_args': 3, 'snippet': 'randt()', 'description': 'random_studentt(seed, df, [shape]) - generates Student-t distributed random values'},
|
||||
'randu': {'min_args': 1, 'max_args': 2, 'snippet': 'randu()', 'description': 'random_uniform(seed, [shape]) - generates uniformly distributed random noise'},
|
||||
'randw': {'min_args': 3, 'max_args': 4, 'snippet': 'randw()', 'description': 'random_weibull(seed, scale, concentration, [shape]) - generates Weibull distributed random values'},
|
||||
'range': {'min_args': 3, 'max_args': 3, 'snippet': 'range()', 'description': 'range(start, stop, step) - creates a range of values between start (inclusive) and stop (exclusive) using step. Use linspace if you want value count.'},
|
||||
'relu': {'min_args': 1, 'max_args': 1, 'snippet': 'relu()', 'description': 'relu(x) - applies rectified linear unit function: max(0, x)'},
|
||||
'remap': {'min_args': 5, 'max_args': 5, 'snippet': 'remap()', 'description': 'remap(v, i_min, i_max, o_min, o_max) - remaps values from input range to output range'},
|
||||
'remove_key': {'min_args': 2, 'max_args': 2, 'snippet': 'remove_key()', 'description': 'remove_key(dict, key) - removes a dictionary entry and returns the updated dictionary'},
|
||||
'repeat': {'min_args': 2, 'max_args': 3, 'snippet': 'repeat()', 'description': 'repeat(x, count, [dims]) - repeats tensor elements; count may be scalar or per-dim list'},
|
||||
'replace': {'min_args': 3, 'max_args': 3, 'snippet': 'replace()', 'description': 'replace(s, old, new) - replaces occurrences of old with new in s. Mostly for strings but can work with lists and tensors.'},
|
||||
'reshape': {'min_args': 2, 'max_args': 2, 'snippet': 'reshape()', 'description': 'reshape(x, shape) - reshapes tensor x to the specified shape'},
|
||||
'rgb_to_cielab': {'min_args': 1, 'max_args': 3, 'snippet': 'rgb_to_cielab()', 'description': 'rgb_to_cielab(r, [g], [b]) - converts RGB to CIELAB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting.'},
|
||||
'rgb_to_hsv': {'min_args': 1, 'max_args': 4, 'snippet': 'rgb_to_hsv()', 'description': 'rgb_to_hsv(rgb, [degrees]) / rgb_to_hsv(r, g, b, [degrees]) - converts RGB to HSV. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting. If degrees is specified and nonzero it returns hue as 0-360 instead of 0-1'},
|
||||
'rgb_to_int': {'min_args': 1, 'max_args': 3, 'snippet': 'rgb_to_int()', 'description': 'rgb_to_int(r, [g, b]) - converts RGB components to an integer It uses last dimension of tensor (or list) as R,G,B if one value. Othervise uses whole thing as channel.'},
|
||||
'rgb_to_oklab': {'min_args': 1, 'max_args': 3, 'snippet': 'rgb_to_oklab()', 'description': 'rgb_to_oklab(r, [g], [b]) - converts RGB to OKLab. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting.'},
|
||||
'ridged': {'min_args': 2, 'max_args': 5, 'snippet': 'ridged()', 'description': 'ridged_noise(seed, scale, [octaves], [offset], [shape]) - generates ridged multi-fractal noise'},
|
||||
'ridged_noise': {'min_args': 2, 'max_args': 5, 'snippet': 'ridged_noise()', 'description': 'ridged_noise(seed, scale, [octaves], [offset], [shape]) - generates ridged multi-fractal noise'},
|
||||
'rife': {'min_args': 4, 'max_args': 5, 'snippet': 'rife()', 'description': 'rife(image1, image2, [tile_size], [iterations], [multi_scale]) - computes an intermediate frame between image1 and image2 using RIFE - tile_size: chuncks image to overlapping tile_size*tile_size parts to conserve memory Default is 1024x1024 when over 2MPx. When tiling size is between 0 - 1 it takes as a fraction of the resolution - iterations: how many times to run RIFE model. Default 12 - multi_scale: also use low resolution of base image for giant movements'},
|
||||
'rm_kay': {'min_args': 2, 'max_args': 2, 'snippet': 'rm_kay()', 'description': 'remove_key(dict, key) - removes a dictionary entry and returns the updated dictionary'},
|
||||
'roll': {'min_args': 2, 'max_args': 3, 'snippet': 'roll()', 'description': 'roll(x, shifts, [axis]) - rolls tensor x along axis'},
|
||||
'round': {'min_args': 1, 'max_args': 1, 'snippet': 'round()', 'description': 'round(x) - rounds x to the nearest integer'},
|
||||
'rshp': {'min_args': 2, 'max_args': 2, 'snippet': 'rshp()', 'description': 'reshape(x, shape) - reshapes tensor x to the specified shape'},
|
||||
'select': {'min_args': 2, 'max_args': 2, 'snippet': 'select()', 'description': 'batch_shuffle(x, indices) - shuffles and duplicates or skips the batch dimension of x according to indices'},
|
||||
'shape': {'min_args': 1, 'max_args': 1, 'snippet': 'shape()', 'description': 'shape(x) - returns the shape of tensor as a list'},
|
||||
'shuffle': {'min_args': 2, 'max_args': 2, 'snippet': 'shuffle()', 'description': 'batch_shuffle(x, indices) - shuffles and duplicates or skips the batch dimension of x according to indices'},
|
||||
'sigm': {'min_args': 1, 'max_args': 1, 'snippet': 'sigm()', 'description': 'sigm(x) - applies the sigmoid function: 1 / (1 + exp(-x))'},
|
||||
'sign': {'min_args': 1, 'max_args': 1, 'snippet': 'sign()', 'description': 'sign(x) - returns the sign of x: -1, 0, or 1'},
|
||||
'sin': {'min_args': 1, 'max_args': 1, 'snippet': 'sin()', 'description': 'sin(x) - applies sinus function to value or each element of value'},
|
||||
'sine': {'min_args': 3, 'max_args': 3, 'snippet': 'sine()', 'description': 'sine_ease(a, b, t) - sine easing between a and b'},
|
||||
'sine_ease': {'min_args': 3, 'max_args': 3, 'snippet': 'sine_ease()', 'description': 'sine_ease(a, b, t) - sine easing between a and b'},
|
||||
'singular_value_decomposition': {'min_args': 1, 'max_args': 2, 'snippet': 'singular_value_decomposition()', 'description': 'svd(x, [full_matrices]) - computes the singular value decomposition of x. Returns a list of 3 tensors: U, S, V such that x = matmul(matmul(U, diagonal_matrix(S,shape(U))), V)'},
|
||||
'sinh': {'min_args': 1, 'max_args': 1, 'snippet': 'sinh()', 'description': 'sinh(x) - applies hyperbolic sinus function to value or each element of value'},
|
||||
'smax': {'min_args': 1, 'max_args': None, 'snippet': 'smax()', 'description': 'smax(x, ...) - computes the maximum of inputs or elements. Tensors must have the same size or be broadcastable to same size.'},
|
||||
'smin': {'min_args': 1, 'max_args': None, 'snippet': 'smin()', 'description': 'smin(x, ...) - computes the minimum of inputs or elements. Tensors must have the same size or be broadcastable to same size.'},
|
||||
'smootherstep': {'min_args': 3, 'max_args': 3, 'snippet': 'smootherstep()', 'description': 'smootherstep(x, edge0, edge1) - smoother interpolation between edge0 and edge1'},
|
||||
'smoothstep': {'min_args': 3, 'max_args': 3, 'snippet': 'smoothstep()', 'description': 'smoothstep(x, edge0, edge1) - smooth interpolation between edge0 and edge1'},
|
||||
'snorm': {'min_args': 1, 'max_args': 2, 'snippet': 'snorm()', 'description': 'snorm(x,[dim]) - frobenius norm of tensor. Along dimension if dimension specified. Dimension can be a list. Defaults to no dimension.'},
|
||||
'softmax': {'min_args': 1, 'max_args': 2, 'snippet': 'softmax()', 'description': 'softmax(x, [axis]) - applies the softmax function to x (sum of slice == 1.0 and max value <= 1.0). axis defaults to last.'},
|
||||
'softmin': {'min_args': 1, 'max_args': 2, 'snippet': 'softmin()', 'description': 'softmin(x, [axis]) - applies the softmin function to x (same as softmax(-x,[axis])). axis defaults to last.'},
|
||||
'softplus': {'min_args': 1, 'max_args': 1, 'snippet': 'softplus()', 'description': 'softplus(x) - applies the softplus function: ln(1 + exp(x))'},
|
||||
'sort': {'min_args': 2, 'max_args': 3, 'snippet': 'sort()', 'description': 'sort(x, [desc], [dim]) - returns a sorted version of x (If input is tensor, it sorts the last dimension)'},
|
||||
'split': {'min_args': 1, 'max_args': 2, 'snippet': 'split()', 'description': 'split(x, [delimiter]) - splits string to list of strings based on delimiter. Default is space.'},
|
||||
'sqrt': {'min_args': 1, 'max_args': 1, 'snippet': 'sqrt()', 'description': 'sqrt(x) - applies sqere root per element. Negative numbers return NaN (not a number)'},
|
||||
'squeeze': {'min_args': 1, 'max_args': 2, 'snippet': 'squeeze()', 'description': 'squeeze(x, [dim]) - removes size-1 dimensions from tensor x, optionally at dim'},
|
||||
'stack_clear': {'min_args': 1, 'max_args': 1, 'snippet': 'stack_clear()', 'description': 'stack_clear(slot) - clears the contents of slot stack'},
|
||||
'stack_get': {'min_args': 1, 'max_args': 1, 'snippet': 'stack_get()', 'description': 'stack_get(slot) - returns the last pushed value in slot without popping it'},
|
||||
'stack_has': {'min_args': 1, 'max_args': 1, 'snippet': 'stack_has()', 'description': 'stack_has(slot) - returns 1.0 if slot exists in stack and is not empty else returns 0.0'},
|
||||
'stack_pop': {'min_args': 1, 'max_args': 1, 'snippet': 'stack_pop()', 'description': 'stack_pop(slot) - removes and returns the last element of slot stack'},
|
||||
'stack_push': {'min_args': 2, 'max_args': 2, 'snippet': 'stack_push()', 'description': 'stack_push(slot, val) - pushes val onto the end of slot stack'},
|
||||
'startswith': {'min_args': 2, 'max_args': 2, 'snippet': 'startswith()', 'description': 'startswith(text, prefix) - returns 1 if text starts with prefix, else 0'},
|
||||
'std': {'min_args': 1, 'max_args': 1, 'snippet': 'std()', 'description': 'std(x) - computes the standard deviation of elements of x'},
|
||||
'step': {'min_args': 2, 'max_args': 2, 'snippet': 'step()', 'description': 'step(x, edge) - returns 0 if x < edge, else 1'},
|
||||
'substr': {'min_args': 2, 'max_args': 3, 'snippet': 'substr()', 'description': 'substring(s, start, [end]) - returns a substring of s from start to end. If end is not supplied, it uses end of string'},
|
||||
'substring': {'min_args': 2, 'max_args': 3, 'snippet': 'substring()', 'description': 'substring(s, start, [end]) - returns a substring of s from start to end. If end is not supplied, it uses end of string'},
|
||||
'sum': {'min_args': 1, 'max_args': 2, 'snippet': 'sum()', 'description': 'sum(x, [dims]) - computes the sum of elements of x, optionally along one or more dimensions'},
|
||||
'svd': {'min_args': 1, 'max_args': 2, 'snippet': 'svd()', 'description': 'svd(x, [full_matrices]) - computes the singular value decomposition of x. Returns a list of 3 tensors: U, S, V such that x = matmul(matmul(U, diagonal_matrix(S,shape(U))), V)'},
|
||||
'swap': {'min_args': 4, 'max_args': 4, 'snippet': 'swap()', 'description': 'swap(x, dim, idx1, idx2) - swaps elements along dim between idx1 and idx2'},
|
||||
'tan': {'min_args': 1, 'max_args': 1, 'snippet': 'tan()', 'description': 'tan(x) - applies tangents function to value or each element of value'},
|
||||
'tanh': {'min_args': 1, 'max_args': 1, 'snippet': 'tanh()', 'description': 'tanh(x) - applies hyperbolic tangents function to value or each element of value'},
|
||||
'tensor': {'min_args': 2, 'max_args': 3, 'snippet': 'tensor()', 'description': 'tensor(shape, [value], [dtype_template]) - creates a tensor with specified shape and optional value/type. Default value is 0 and default format FP32'},
|
||||
'text_image': {'min_args': 3, 'max_args': 9, 'snippet': 'text_image()', 'description': 'text_image(text, font, size, [max_width], [weight], [rotation_angle], [line_spacing], [italic], [underline]) - renders text to an 2D tensor'},
|
||||
'timestamp': {'min_args': 0, 'max_args': 0, 'snippet': 'timestamp()', 'description': 'timestamp() - returns the current system timestamp'},
|
||||
'tmax': {'min_args': 2, 'max_args': 2, 'snippet': 'tmax()', 'description': 'tmax(x,y) - elementwise maximum of tensor or list. max(x,y) when inputs are floats'},
|
||||
'tmin': {'min_args': 2, 'max_args': 2, 'snippet': 'tmin()', 'description': 'tmin(x, y) - elementwise minimum of tensor or list. min(x,y) when inputs are floats'},
|
||||
'tnorm': {'min_args': 1, 'max_args': 1, 'snippet': 'tnorm()', 'description': 'tnorm(x) - normalises tensor or list by multiplication such that sum(x^2)==1.0 for each slice. The slice is last dimension of the tensor.'},
|
||||
'topk': {'min_args': 2, 'max_args': 2, 'snippet': 'topk()', 'description': 'topk(x, k) - returns the k largest elements of x. For tensors it keeps them in place.'},
|
||||
'topk_ind': {'min_args': 2, 'max_args': 2, 'snippet': 'topk_ind()', 'description': 'topk_indices(x, k) - returns the indices of the k largest elements of x'},
|
||||
'topk_indices': {'min_args': 2, 'max_args': 2, 'snippet': 'topk_indices()', 'description': 'topk_indices(x, k) - returns the indices of the k largest elements of x'},
|
||||
'trim': {'min_args': 1, 'max_args': 1, 'snippet': 'trim()', 'description': 'trim(x) - removes leading and trailing whitespace from string'},
|
||||
'turbulence': {'min_args': 2, 'max_args': 5, 'snippet': 'turbulence()', 'description': 'plasma_noise(seed, scale, [octaves], [offset], [shape]) - generates Plasma/Turbulence noise - same as perlin but default octaves 4'},
|
||||
'unique': {'min_args': 1, 'max_args': 1, 'snippet': 'unique()', 'description': 'unique(x) - returns the unique elements (sorted, flatened)'},
|
||||
'unsqueeze': {'min_args': 2, 'max_args': 2, 'snippet': 'unsqueeze()', 'description': 'unsqueeze(x, dim) - inserts a size-1 dimension into tensor x at dim'},
|
||||
'upper': {'min_args': 1, 'max_args': 1, 'snippet': 'upper()', 'description': 'upper(x) - converts string to uppercase'},
|
||||
'var': {'min_args': 1, 'max_args': 1, 'snippet': 'var()', 'description': 'var(x) - computes the variance of elements of x'},
|
||||
'voronoi': {'min_args': 2, 'max_args': 5, 'snippet': 'voronoi()', 'description': 'cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise'},
|
||||
'voronoi_noise': {'min_args': 2, 'max_args': 5, 'snippet': 'voronoi_noise()', 'description': 'cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise'},
|
||||
'where': {'min_args': 3, 'max_args': 3, 'snippet': 'where()', 'description': 'where(condition, x, y) - returns x if condition is true, else y. Runs per element.'},
|
||||
'worley': {'min_args': 2, 'max_args': 5, 'snippet': 'worley()', 'description': 'cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise'},
|
||||
}
|
||||
'System.Collections.Hashtable': {'min_args': , 'max_args': None, 'snippet': '', 'description': ''},
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -84,153 +84,154 @@ DIST=83
|
||||
REMAP=84
|
||||
COSSIM=85
|
||||
COUNT=86
|
||||
REPEAT=87
|
||||
FLATTEN=88
|
||||
APPEND=89
|
||||
GET_VALUE=90
|
||||
FLOW_APPLY=91
|
||||
BATCH_SHUFFLE=92
|
||||
MOTION_MASK=93
|
||||
FLOW_TO_IMAGE=94
|
||||
FLOW_MAG=95
|
||||
FLOW_ANG=96
|
||||
WHERE=97
|
||||
HISTOGRAM=98
|
||||
OVERLAY=99
|
||||
PAD=100
|
||||
CROSS=101
|
||||
MATMUL=102
|
||||
RIFE=103
|
||||
BNOT=104
|
||||
BITCOUNT=105
|
||||
SHAPE=106
|
||||
BAND=107
|
||||
XOR=108
|
||||
BOR=109
|
||||
TENSOR=110
|
||||
ADD_KEY=111
|
||||
REMOVE_KEY=112
|
||||
PUSH=113
|
||||
POP=114
|
||||
CLEAR=115
|
||||
HAS=116
|
||||
GET=117
|
||||
CONCAT=118
|
||||
INT=119
|
||||
FLOAT=120
|
||||
UPPER=121
|
||||
LOWER=122
|
||||
TRIM=123
|
||||
SPLIT=124
|
||||
JOIN=125
|
||||
SUBSTRING=126
|
||||
FIND=127
|
||||
REPLACE=128
|
||||
DILATE=129
|
||||
ERODE=130
|
||||
MORPH_OPEN=131
|
||||
MORPH_CLOSE=132
|
||||
RGB_TO_OKLAB=133
|
||||
RGB_TO_CIELAB=134
|
||||
OKLAB_TO_RGB=135
|
||||
CIELAB_TO_RGB=136
|
||||
RGB_TO_HSV=137
|
||||
HSV_TO_RGB=138
|
||||
INT_TO_RGB=139
|
||||
RGB_TO_INT=140
|
||||
INTERPOLATE_LINEAR=141
|
||||
INTERPOLATE_AREA=142
|
||||
INTERPOLATE_NEAREST=143
|
||||
TEXT_IMAGE=144
|
||||
AS_NESTED=145
|
||||
SVD=146
|
||||
DIAG=147
|
||||
IF=148
|
||||
ELSE=149
|
||||
WHILE=150
|
||||
FOR=151
|
||||
IN=152
|
||||
BREAK=153
|
||||
CONTINUE=154
|
||||
RETURN=155
|
||||
TIMESTAMP=156
|
||||
SORT=157
|
||||
ARGSORT=158
|
||||
ARGMIN=159
|
||||
ARGMAX=160
|
||||
SOFTMAX=161
|
||||
SOFTMIN=162
|
||||
UNIQUE=163
|
||||
FLIP=164
|
||||
STARTSWITH=165
|
||||
ENDSWITH=166
|
||||
SQUEEZE=167
|
||||
UNSQUEEZE=168
|
||||
ROLL=169
|
||||
COV=170
|
||||
CORR=171
|
||||
ENTROPY=172
|
||||
CROP=173
|
||||
NONE=174
|
||||
COORDS=175
|
||||
NOISE=176
|
||||
RAND=177
|
||||
CAUCHY=178
|
||||
EXPONENTIAL=179
|
||||
LOGNORMAL=180
|
||||
BERNOULLI=181
|
||||
POISSON=182
|
||||
GAMMADIST=183
|
||||
BETADIST=184
|
||||
LAPLACEDIST=185
|
||||
GUMBELDIST=186
|
||||
WEIBULLDIST=187
|
||||
CHI2DIST=188
|
||||
STUDENTTDIST=189
|
||||
PERLIN=190
|
||||
CELLULAR=191
|
||||
PLASMA=192
|
||||
RIDGED=193
|
||||
DOMAIN_WARP=194
|
||||
PLUS=195
|
||||
MINUS=196
|
||||
MULT=197
|
||||
DIV=198
|
||||
MOD=199
|
||||
POW=200
|
||||
LSHIFT=201
|
||||
RSHIFT=202
|
||||
GE=203
|
||||
GT=204
|
||||
LE=205
|
||||
LT=206
|
||||
EQ=207
|
||||
EQUEALS=208
|
||||
PLUS_EQ=209
|
||||
MINUS_EQ=210
|
||||
MULT_EQ=211
|
||||
DIV_EQ=212
|
||||
MOD_EQ=213
|
||||
NE=214
|
||||
PIPE=215
|
||||
LPAREN=216
|
||||
RPAREN=217
|
||||
COMMA=218
|
||||
SEMICOLON=219
|
||||
ARROW=220
|
||||
LBRACKET=221
|
||||
RBRACKET=222
|
||||
QUESTION=223
|
||||
COLON=224
|
||||
LBRACE=225
|
||||
RBRACE=226
|
||||
NUMBER=227
|
||||
CONSTANT=228
|
||||
STRING=229
|
||||
VARIABLE=230
|
||||
SL_COMMENT=231
|
||||
ML_COMMENT=232
|
||||
WS=233
|
||||
KEYS=87
|
||||
REPEAT=88
|
||||
FLATTEN=89
|
||||
APPEND=90
|
||||
GET_VALUE=91
|
||||
FLOW_APPLY=92
|
||||
BATCH_SHUFFLE=93
|
||||
MOTION_MASK=94
|
||||
FLOW_TO_IMAGE=95
|
||||
FLOW_MAG=96
|
||||
FLOW_ANG=97
|
||||
WHERE=98
|
||||
HISTOGRAM=99
|
||||
OVERLAY=100
|
||||
PAD=101
|
||||
CROSS=102
|
||||
MATMUL=103
|
||||
RIFE=104
|
||||
BNOT=105
|
||||
BITCOUNT=106
|
||||
SHAPE=107
|
||||
BAND=108
|
||||
XOR=109
|
||||
BOR=110
|
||||
TENSOR=111
|
||||
ADD_KEY=112
|
||||
REMOVE_KEY=113
|
||||
PUSH=114
|
||||
POP=115
|
||||
CLEAR=116
|
||||
HAS=117
|
||||
GET=118
|
||||
CONCAT=119
|
||||
INT=120
|
||||
FLOAT=121
|
||||
UPPER=122
|
||||
LOWER=123
|
||||
TRIM=124
|
||||
SPLIT=125
|
||||
JOIN=126
|
||||
SUBSTRING=127
|
||||
FIND=128
|
||||
REPLACE=129
|
||||
DILATE=130
|
||||
ERODE=131
|
||||
MORPH_OPEN=132
|
||||
MORPH_CLOSE=133
|
||||
RGB_TO_OKLAB=134
|
||||
RGB_TO_CIELAB=135
|
||||
OKLAB_TO_RGB=136
|
||||
CIELAB_TO_RGB=137
|
||||
RGB_TO_HSV=138
|
||||
HSV_TO_RGB=139
|
||||
INT_TO_RGB=140
|
||||
RGB_TO_INT=141
|
||||
INTERPOLATE_LINEAR=142
|
||||
INTERPOLATE_AREA=143
|
||||
INTERPOLATE_NEAREST=144
|
||||
TEXT_IMAGE=145
|
||||
AS_NESTED=146
|
||||
SVD=147
|
||||
DIAG=148
|
||||
IF=149
|
||||
ELSE=150
|
||||
WHILE=151
|
||||
FOR=152
|
||||
IN=153
|
||||
BREAK=154
|
||||
CONTINUE=155
|
||||
RETURN=156
|
||||
TIMESTAMP=157
|
||||
SORT=158
|
||||
ARGSORT=159
|
||||
ARGMIN=160
|
||||
ARGMAX=161
|
||||
SOFTMAX=162
|
||||
SOFTMIN=163
|
||||
UNIQUE=164
|
||||
FLIP=165
|
||||
STARTSWITH=166
|
||||
ENDSWITH=167
|
||||
SQUEEZE=168
|
||||
UNSQUEEZE=169
|
||||
ROLL=170
|
||||
COV=171
|
||||
CORR=172
|
||||
ENTROPY=173
|
||||
CROP=174
|
||||
NONE=175
|
||||
COORDS=176
|
||||
NOISE=177
|
||||
RAND=178
|
||||
CAUCHY=179
|
||||
EXPONENTIAL=180
|
||||
LOGNORMAL=181
|
||||
BERNOULLI=182
|
||||
POISSON=183
|
||||
GAMMADIST=184
|
||||
BETADIST=185
|
||||
LAPLACEDIST=186
|
||||
GUMBELDIST=187
|
||||
WEIBULLDIST=188
|
||||
CHI2DIST=189
|
||||
STUDENTTDIST=190
|
||||
PERLIN=191
|
||||
CELLULAR=192
|
||||
PLASMA=193
|
||||
RIDGED=194
|
||||
DOMAIN_WARP=195
|
||||
PLUS=196
|
||||
MINUS=197
|
||||
MULT=198
|
||||
DIV=199
|
||||
MOD=200
|
||||
POW=201
|
||||
LSHIFT=202
|
||||
RSHIFT=203
|
||||
GE=204
|
||||
GT=205
|
||||
LE=206
|
||||
LT=207
|
||||
EQ=208
|
||||
EQUEALS=209
|
||||
PLUS_EQ=210
|
||||
MINUS_EQ=211
|
||||
MULT_EQ=212
|
||||
DIV_EQ=213
|
||||
MOD_EQ=214
|
||||
NE=215
|
||||
PIPE=216
|
||||
LPAREN=217
|
||||
RPAREN=218
|
||||
COMMA=219
|
||||
SEMICOLON=220
|
||||
ARROW=221
|
||||
LBRACKET=222
|
||||
RBRACKET=223
|
||||
QUESTION=224
|
||||
COLON=225
|
||||
LBRACE=226
|
||||
RBRACE=227
|
||||
NUMBER=228
|
||||
CONSTANT=229
|
||||
STRING=230
|
||||
VARIABLE=231
|
||||
SL_COMMENT=232
|
||||
ML_COMMENT=233
|
||||
WS=234
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -300,105 +301,106 @@ WS=233
|
||||
'cumprod'=76
|
||||
'smootherstep'=82
|
||||
'remap'=84
|
||||
'repeat'=87
|
||||
'flatten'=88
|
||||
'append'=89
|
||||
'get_value'=90
|
||||
'flow_apply'=91
|
||||
'motion_mask'=93
|
||||
'flow_to_image'=94
|
||||
'where'=97
|
||||
'overlay'=99
|
||||
'pad'=100
|
||||
'cross'=101
|
||||
'matmul'=102
|
||||
'rife'=103
|
||||
'shape'=106
|
||||
'tensor'=110
|
||||
'add_key'=111
|
||||
'stack_push'=113
|
||||
'stack_pop'=114
|
||||
'stack_clear'=115
|
||||
'stack_has'=116
|
||||
'stack_get'=117
|
||||
'int'=119
|
||||
'float'=120
|
||||
'upper'=121
|
||||
'lower'=122
|
||||
'trim'=123
|
||||
'split'=124
|
||||
'join'=125
|
||||
'find'=127
|
||||
'replace'=128
|
||||
'dilate'=129
|
||||
'erode'=130
|
||||
'morph_open'=131
|
||||
'morph_close'=132
|
||||
'rgb_to_oklab'=133
|
||||
'rgb_to_cielab'=134
|
||||
'oklab_to_rgb'=135
|
||||
'cielab_to_rgb'=136
|
||||
'rgb_to_hsv'=137
|
||||
'hsv_to_rgb'=138
|
||||
'int_to_rgb'=139
|
||||
'rgb_to_int'=140
|
||||
'interpolate_linear'=141
|
||||
'interpolate_area'=142
|
||||
'text_image'=144
|
||||
'as_nested_tensor'=145
|
||||
'if'=148
|
||||
'else'=149
|
||||
'while'=150
|
||||
'for'=151
|
||||
'in'=152
|
||||
'break'=153
|
||||
'continue'=154
|
||||
'return'=155
|
||||
'sort'=157
|
||||
'argsort'=158
|
||||
'argmin'=159
|
||||
'argmax'=160
|
||||
'softmax'=161
|
||||
'softmin'=162
|
||||
'unique'=163
|
||||
'flip'=164
|
||||
'startswith'=165
|
||||
'endswith'=166
|
||||
'squeeze'=167
|
||||
'unsqueeze'=168
|
||||
'roll'=169
|
||||
'cov'=170
|
||||
'entropy'=172
|
||||
'crop'=173
|
||||
'+'=195
|
||||
'-'=196
|
||||
'*'=197
|
||||
'/'=198
|
||||
'%'=199
|
||||
'^'=200
|
||||
'<<'=201
|
||||
'>>'=202
|
||||
'>='=203
|
||||
'>'=204
|
||||
'<='=205
|
||||
'<'=206
|
||||
'=='=207
|
||||
'='=208
|
||||
'+='=209
|
||||
'-='=210
|
||||
'*='=211
|
||||
'/='=212
|
||||
'%='=213
|
||||
'!='=214
|
||||
'|'=215
|
||||
'('=216
|
||||
')'=217
|
||||
','=218
|
||||
';'=219
|
||||
'->'=220
|
||||
'['=221
|
||||
']'=222
|
||||
'?'=223
|
||||
':'=224
|
||||
'{'=225
|
||||
'}'=226
|
||||
'keys'=87
|
||||
'repeat'=88
|
||||
'flatten'=89
|
||||
'append'=90
|
||||
'get_value'=91
|
||||
'flow_apply'=92
|
||||
'motion_mask'=94
|
||||
'flow_to_image'=95
|
||||
'where'=98
|
||||
'overlay'=100
|
||||
'pad'=101
|
||||
'cross'=102
|
||||
'matmul'=103
|
||||
'rife'=104
|
||||
'shape'=107
|
||||
'tensor'=111
|
||||
'add_key'=112
|
||||
'stack_push'=114
|
||||
'stack_pop'=115
|
||||
'stack_clear'=116
|
||||
'stack_has'=117
|
||||
'stack_get'=118
|
||||
'int'=120
|
||||
'float'=121
|
||||
'upper'=122
|
||||
'lower'=123
|
||||
'trim'=124
|
||||
'split'=125
|
||||
'join'=126
|
||||
'find'=128
|
||||
'replace'=129
|
||||
'dilate'=130
|
||||
'erode'=131
|
||||
'morph_open'=132
|
||||
'morph_close'=133
|
||||
'rgb_to_oklab'=134
|
||||
'rgb_to_cielab'=135
|
||||
'oklab_to_rgb'=136
|
||||
'cielab_to_rgb'=137
|
||||
'rgb_to_hsv'=138
|
||||
'hsv_to_rgb'=139
|
||||
'int_to_rgb'=140
|
||||
'rgb_to_int'=141
|
||||
'interpolate_linear'=142
|
||||
'interpolate_area'=143
|
||||
'text_image'=145
|
||||
'as_nested_tensor'=146
|
||||
'if'=149
|
||||
'else'=150
|
||||
'while'=151
|
||||
'for'=152
|
||||
'in'=153
|
||||
'break'=154
|
||||
'continue'=155
|
||||
'return'=156
|
||||
'sort'=158
|
||||
'argsort'=159
|
||||
'argmin'=160
|
||||
'argmax'=161
|
||||
'softmax'=162
|
||||
'softmin'=163
|
||||
'unique'=164
|
||||
'flip'=165
|
||||
'startswith'=166
|
||||
'endswith'=167
|
||||
'squeeze'=168
|
||||
'unsqueeze'=169
|
||||
'roll'=170
|
||||
'cov'=171
|
||||
'entropy'=173
|
||||
'crop'=174
|
||||
'+'=196
|
||||
'-'=197
|
||||
'*'=198
|
||||
'/'=199
|
||||
'%'=200
|
||||
'^'=201
|
||||
'<<'=202
|
||||
'>>'=203
|
||||
'>='=204
|
||||
'>'=205
|
||||
'<='=206
|
||||
'<'=207
|
||||
'=='=208
|
||||
'='=209
|
||||
'+='=210
|
||||
'-='=211
|
||||
'*='=212
|
||||
'/='=213
|
||||
'%='=214
|
||||
'!='=215
|
||||
'|'=216
|
||||
'('=217
|
||||
')'=218
|
||||
','=219
|
||||
';'=220
|
||||
'->'=221
|
||||
'['=222
|
||||
']'=223
|
||||
'?'=224
|
||||
':'=225
|
||||
'{'=226
|
||||
'}'=227
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1354
-1349
File diff suppressed because it is too large
Load Diff
@@ -84,153 +84,154 @@ DIST=83
|
||||
REMAP=84
|
||||
COSSIM=85
|
||||
COUNT=86
|
||||
REPEAT=87
|
||||
FLATTEN=88
|
||||
APPEND=89
|
||||
GET_VALUE=90
|
||||
FLOW_APPLY=91
|
||||
BATCH_SHUFFLE=92
|
||||
MOTION_MASK=93
|
||||
FLOW_TO_IMAGE=94
|
||||
FLOW_MAG=95
|
||||
FLOW_ANG=96
|
||||
WHERE=97
|
||||
HISTOGRAM=98
|
||||
OVERLAY=99
|
||||
PAD=100
|
||||
CROSS=101
|
||||
MATMUL=102
|
||||
RIFE=103
|
||||
BNOT=104
|
||||
BITCOUNT=105
|
||||
SHAPE=106
|
||||
BAND=107
|
||||
XOR=108
|
||||
BOR=109
|
||||
TENSOR=110
|
||||
ADD_KEY=111
|
||||
REMOVE_KEY=112
|
||||
PUSH=113
|
||||
POP=114
|
||||
CLEAR=115
|
||||
HAS=116
|
||||
GET=117
|
||||
CONCAT=118
|
||||
INT=119
|
||||
FLOAT=120
|
||||
UPPER=121
|
||||
LOWER=122
|
||||
TRIM=123
|
||||
SPLIT=124
|
||||
JOIN=125
|
||||
SUBSTRING=126
|
||||
FIND=127
|
||||
REPLACE=128
|
||||
DILATE=129
|
||||
ERODE=130
|
||||
MORPH_OPEN=131
|
||||
MORPH_CLOSE=132
|
||||
RGB_TO_OKLAB=133
|
||||
RGB_TO_CIELAB=134
|
||||
OKLAB_TO_RGB=135
|
||||
CIELAB_TO_RGB=136
|
||||
RGB_TO_HSV=137
|
||||
HSV_TO_RGB=138
|
||||
INT_TO_RGB=139
|
||||
RGB_TO_INT=140
|
||||
INTERPOLATE_LINEAR=141
|
||||
INTERPOLATE_AREA=142
|
||||
INTERPOLATE_NEAREST=143
|
||||
TEXT_IMAGE=144
|
||||
AS_NESTED=145
|
||||
SVD=146
|
||||
DIAG=147
|
||||
IF=148
|
||||
ELSE=149
|
||||
WHILE=150
|
||||
FOR=151
|
||||
IN=152
|
||||
BREAK=153
|
||||
CONTINUE=154
|
||||
RETURN=155
|
||||
TIMESTAMP=156
|
||||
SORT=157
|
||||
ARGSORT=158
|
||||
ARGMIN=159
|
||||
ARGMAX=160
|
||||
SOFTMAX=161
|
||||
SOFTMIN=162
|
||||
UNIQUE=163
|
||||
FLIP=164
|
||||
STARTSWITH=165
|
||||
ENDSWITH=166
|
||||
SQUEEZE=167
|
||||
UNSQUEEZE=168
|
||||
ROLL=169
|
||||
COV=170
|
||||
CORR=171
|
||||
ENTROPY=172
|
||||
CROP=173
|
||||
NONE=174
|
||||
COORDS=175
|
||||
NOISE=176
|
||||
RAND=177
|
||||
CAUCHY=178
|
||||
EXPONENTIAL=179
|
||||
LOGNORMAL=180
|
||||
BERNOULLI=181
|
||||
POISSON=182
|
||||
GAMMADIST=183
|
||||
BETADIST=184
|
||||
LAPLACEDIST=185
|
||||
GUMBELDIST=186
|
||||
WEIBULLDIST=187
|
||||
CHI2DIST=188
|
||||
STUDENTTDIST=189
|
||||
PERLIN=190
|
||||
CELLULAR=191
|
||||
PLASMA=192
|
||||
RIDGED=193
|
||||
DOMAIN_WARP=194
|
||||
PLUS=195
|
||||
MINUS=196
|
||||
MULT=197
|
||||
DIV=198
|
||||
MOD=199
|
||||
POW=200
|
||||
LSHIFT=201
|
||||
RSHIFT=202
|
||||
GE=203
|
||||
GT=204
|
||||
LE=205
|
||||
LT=206
|
||||
EQ=207
|
||||
EQUEALS=208
|
||||
PLUS_EQ=209
|
||||
MINUS_EQ=210
|
||||
MULT_EQ=211
|
||||
DIV_EQ=212
|
||||
MOD_EQ=213
|
||||
NE=214
|
||||
PIPE=215
|
||||
LPAREN=216
|
||||
RPAREN=217
|
||||
COMMA=218
|
||||
SEMICOLON=219
|
||||
ARROW=220
|
||||
LBRACKET=221
|
||||
RBRACKET=222
|
||||
QUESTION=223
|
||||
COLON=224
|
||||
LBRACE=225
|
||||
RBRACE=226
|
||||
NUMBER=227
|
||||
CONSTANT=228
|
||||
STRING=229
|
||||
VARIABLE=230
|
||||
SL_COMMENT=231
|
||||
ML_COMMENT=232
|
||||
WS=233
|
||||
KEYS=87
|
||||
REPEAT=88
|
||||
FLATTEN=89
|
||||
APPEND=90
|
||||
GET_VALUE=91
|
||||
FLOW_APPLY=92
|
||||
BATCH_SHUFFLE=93
|
||||
MOTION_MASK=94
|
||||
FLOW_TO_IMAGE=95
|
||||
FLOW_MAG=96
|
||||
FLOW_ANG=97
|
||||
WHERE=98
|
||||
HISTOGRAM=99
|
||||
OVERLAY=100
|
||||
PAD=101
|
||||
CROSS=102
|
||||
MATMUL=103
|
||||
RIFE=104
|
||||
BNOT=105
|
||||
BITCOUNT=106
|
||||
SHAPE=107
|
||||
BAND=108
|
||||
XOR=109
|
||||
BOR=110
|
||||
TENSOR=111
|
||||
ADD_KEY=112
|
||||
REMOVE_KEY=113
|
||||
PUSH=114
|
||||
POP=115
|
||||
CLEAR=116
|
||||
HAS=117
|
||||
GET=118
|
||||
CONCAT=119
|
||||
INT=120
|
||||
FLOAT=121
|
||||
UPPER=122
|
||||
LOWER=123
|
||||
TRIM=124
|
||||
SPLIT=125
|
||||
JOIN=126
|
||||
SUBSTRING=127
|
||||
FIND=128
|
||||
REPLACE=129
|
||||
DILATE=130
|
||||
ERODE=131
|
||||
MORPH_OPEN=132
|
||||
MORPH_CLOSE=133
|
||||
RGB_TO_OKLAB=134
|
||||
RGB_TO_CIELAB=135
|
||||
OKLAB_TO_RGB=136
|
||||
CIELAB_TO_RGB=137
|
||||
RGB_TO_HSV=138
|
||||
HSV_TO_RGB=139
|
||||
INT_TO_RGB=140
|
||||
RGB_TO_INT=141
|
||||
INTERPOLATE_LINEAR=142
|
||||
INTERPOLATE_AREA=143
|
||||
INTERPOLATE_NEAREST=144
|
||||
TEXT_IMAGE=145
|
||||
AS_NESTED=146
|
||||
SVD=147
|
||||
DIAG=148
|
||||
IF=149
|
||||
ELSE=150
|
||||
WHILE=151
|
||||
FOR=152
|
||||
IN=153
|
||||
BREAK=154
|
||||
CONTINUE=155
|
||||
RETURN=156
|
||||
TIMESTAMP=157
|
||||
SORT=158
|
||||
ARGSORT=159
|
||||
ARGMIN=160
|
||||
ARGMAX=161
|
||||
SOFTMAX=162
|
||||
SOFTMIN=163
|
||||
UNIQUE=164
|
||||
FLIP=165
|
||||
STARTSWITH=166
|
||||
ENDSWITH=167
|
||||
SQUEEZE=168
|
||||
UNSQUEEZE=169
|
||||
ROLL=170
|
||||
COV=171
|
||||
CORR=172
|
||||
ENTROPY=173
|
||||
CROP=174
|
||||
NONE=175
|
||||
COORDS=176
|
||||
NOISE=177
|
||||
RAND=178
|
||||
CAUCHY=179
|
||||
EXPONENTIAL=180
|
||||
LOGNORMAL=181
|
||||
BERNOULLI=182
|
||||
POISSON=183
|
||||
GAMMADIST=184
|
||||
BETADIST=185
|
||||
LAPLACEDIST=186
|
||||
GUMBELDIST=187
|
||||
WEIBULLDIST=188
|
||||
CHI2DIST=189
|
||||
STUDENTTDIST=190
|
||||
PERLIN=191
|
||||
CELLULAR=192
|
||||
PLASMA=193
|
||||
RIDGED=194
|
||||
DOMAIN_WARP=195
|
||||
PLUS=196
|
||||
MINUS=197
|
||||
MULT=198
|
||||
DIV=199
|
||||
MOD=200
|
||||
POW=201
|
||||
LSHIFT=202
|
||||
RSHIFT=203
|
||||
GE=204
|
||||
GT=205
|
||||
LE=206
|
||||
LT=207
|
||||
EQ=208
|
||||
EQUEALS=209
|
||||
PLUS_EQ=210
|
||||
MINUS_EQ=211
|
||||
MULT_EQ=212
|
||||
DIV_EQ=213
|
||||
MOD_EQ=214
|
||||
NE=215
|
||||
PIPE=216
|
||||
LPAREN=217
|
||||
RPAREN=218
|
||||
COMMA=219
|
||||
SEMICOLON=220
|
||||
ARROW=221
|
||||
LBRACKET=222
|
||||
RBRACKET=223
|
||||
QUESTION=224
|
||||
COLON=225
|
||||
LBRACE=226
|
||||
RBRACE=227
|
||||
NUMBER=228
|
||||
CONSTANT=229
|
||||
STRING=230
|
||||
VARIABLE=231
|
||||
SL_COMMENT=232
|
||||
ML_COMMENT=233
|
||||
WS=234
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -300,105 +301,106 @@ WS=233
|
||||
'cumprod'=76
|
||||
'smootherstep'=82
|
||||
'remap'=84
|
||||
'repeat'=87
|
||||
'flatten'=88
|
||||
'append'=89
|
||||
'get_value'=90
|
||||
'flow_apply'=91
|
||||
'motion_mask'=93
|
||||
'flow_to_image'=94
|
||||
'where'=97
|
||||
'overlay'=99
|
||||
'pad'=100
|
||||
'cross'=101
|
||||
'matmul'=102
|
||||
'rife'=103
|
||||
'shape'=106
|
||||
'tensor'=110
|
||||
'add_key'=111
|
||||
'stack_push'=113
|
||||
'stack_pop'=114
|
||||
'stack_clear'=115
|
||||
'stack_has'=116
|
||||
'stack_get'=117
|
||||
'int'=119
|
||||
'float'=120
|
||||
'upper'=121
|
||||
'lower'=122
|
||||
'trim'=123
|
||||
'split'=124
|
||||
'join'=125
|
||||
'find'=127
|
||||
'replace'=128
|
||||
'dilate'=129
|
||||
'erode'=130
|
||||
'morph_open'=131
|
||||
'morph_close'=132
|
||||
'rgb_to_oklab'=133
|
||||
'rgb_to_cielab'=134
|
||||
'oklab_to_rgb'=135
|
||||
'cielab_to_rgb'=136
|
||||
'rgb_to_hsv'=137
|
||||
'hsv_to_rgb'=138
|
||||
'int_to_rgb'=139
|
||||
'rgb_to_int'=140
|
||||
'interpolate_linear'=141
|
||||
'interpolate_area'=142
|
||||
'text_image'=144
|
||||
'as_nested_tensor'=145
|
||||
'if'=148
|
||||
'else'=149
|
||||
'while'=150
|
||||
'for'=151
|
||||
'in'=152
|
||||
'break'=153
|
||||
'continue'=154
|
||||
'return'=155
|
||||
'sort'=157
|
||||
'argsort'=158
|
||||
'argmin'=159
|
||||
'argmax'=160
|
||||
'softmax'=161
|
||||
'softmin'=162
|
||||
'unique'=163
|
||||
'flip'=164
|
||||
'startswith'=165
|
||||
'endswith'=166
|
||||
'squeeze'=167
|
||||
'unsqueeze'=168
|
||||
'roll'=169
|
||||
'cov'=170
|
||||
'entropy'=172
|
||||
'crop'=173
|
||||
'+'=195
|
||||
'-'=196
|
||||
'*'=197
|
||||
'/'=198
|
||||
'%'=199
|
||||
'^'=200
|
||||
'<<'=201
|
||||
'>>'=202
|
||||
'>='=203
|
||||
'>'=204
|
||||
'<='=205
|
||||
'<'=206
|
||||
'=='=207
|
||||
'='=208
|
||||
'+='=209
|
||||
'-='=210
|
||||
'*='=211
|
||||
'/='=212
|
||||
'%='=213
|
||||
'!='=214
|
||||
'|'=215
|
||||
'('=216
|
||||
')'=217
|
||||
','=218
|
||||
';'=219
|
||||
'->'=220
|
||||
'['=221
|
||||
']'=222
|
||||
'?'=223
|
||||
':'=224
|
||||
'{'=225
|
||||
'}'=226
|
||||
'keys'=87
|
||||
'repeat'=88
|
||||
'flatten'=89
|
||||
'append'=90
|
||||
'get_value'=91
|
||||
'flow_apply'=92
|
||||
'motion_mask'=94
|
||||
'flow_to_image'=95
|
||||
'where'=98
|
||||
'overlay'=100
|
||||
'pad'=101
|
||||
'cross'=102
|
||||
'matmul'=103
|
||||
'rife'=104
|
||||
'shape'=107
|
||||
'tensor'=111
|
||||
'add_key'=112
|
||||
'stack_push'=114
|
||||
'stack_pop'=115
|
||||
'stack_clear'=116
|
||||
'stack_has'=117
|
||||
'stack_get'=118
|
||||
'int'=120
|
||||
'float'=121
|
||||
'upper'=122
|
||||
'lower'=123
|
||||
'trim'=124
|
||||
'split'=125
|
||||
'join'=126
|
||||
'find'=128
|
||||
'replace'=129
|
||||
'dilate'=130
|
||||
'erode'=131
|
||||
'morph_open'=132
|
||||
'morph_close'=133
|
||||
'rgb_to_oklab'=134
|
||||
'rgb_to_cielab'=135
|
||||
'oklab_to_rgb'=136
|
||||
'cielab_to_rgb'=137
|
||||
'rgb_to_hsv'=138
|
||||
'hsv_to_rgb'=139
|
||||
'int_to_rgb'=140
|
||||
'rgb_to_int'=141
|
||||
'interpolate_linear'=142
|
||||
'interpolate_area'=143
|
||||
'text_image'=145
|
||||
'as_nested_tensor'=146
|
||||
'if'=149
|
||||
'else'=150
|
||||
'while'=151
|
||||
'for'=152
|
||||
'in'=153
|
||||
'break'=154
|
||||
'continue'=155
|
||||
'return'=156
|
||||
'sort'=158
|
||||
'argsort'=159
|
||||
'argmin'=160
|
||||
'argmax'=161
|
||||
'softmax'=162
|
||||
'softmin'=163
|
||||
'unique'=164
|
||||
'flip'=165
|
||||
'startswith'=166
|
||||
'endswith'=167
|
||||
'squeeze'=168
|
||||
'unsqueeze'=169
|
||||
'roll'=170
|
||||
'cov'=171
|
||||
'entropy'=173
|
||||
'crop'=174
|
||||
'+'=196
|
||||
'-'=197
|
||||
'*'=198
|
||||
'/'=199
|
||||
'%'=200
|
||||
'^'=201
|
||||
'<<'=202
|
||||
'>>'=203
|
||||
'>='=204
|
||||
'>'=205
|
||||
'<='=206
|
||||
'<'=207
|
||||
'=='=208
|
||||
'='=209
|
||||
'+='=210
|
||||
'-='=211
|
||||
'*='=212
|
||||
'/='=213
|
||||
'%='=214
|
||||
'!='=215
|
||||
'|'=216
|
||||
'('=217
|
||||
')'=218
|
||||
','=219
|
||||
';'=220
|
||||
'->'=221
|
||||
'['=222
|
||||
']'=223
|
||||
'?'=224
|
||||
':'=225
|
||||
'{'=226
|
||||
'}'=227
|
||||
|
||||
@@ -1124,6 +1124,15 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#KeysFunc.
|
||||
def enterKeysFunc(self, ctx:MathExprParser.KeysFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#KeysFunc.
|
||||
def exitKeysFunc(self, ctx:MathExprParser.KeysFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#RepeatFunc.
|
||||
def enterRepeatFunc(self, ctx:MathExprParser.RepeatFuncContext):
|
||||
pass
|
||||
|
||||
+2638
-2589
File diff suppressed because one or more lines are too long
@@ -629,6 +629,11 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#KeysFunc.
|
||||
def visitKeysFunc(self, ctx:MathExprParser.KeysFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#RepeatFunc.
|
||||
def visitRepeatFunc(self, ctx:MathExprParser.RepeatFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
+3
-254
@@ -9,260 +9,9 @@ export const CONSTANTS = new Set([
|
||||
]);
|
||||
|
||||
export const FUNCTIONS = new Set([
|
||||
"abs", "acos", "acosh", "add_key", "all", "angle", "any", "append", "argmax", "argmin", "argsort", "as_nested_tensor", "asin", "asinh", "atan", "atan2", "atanh", "band", "batch_shuffle", "bitcount", "bitwise_and", "bitwise_not", "bitwise_or", "bitwise_xor", "blur", "bnot", "bor", "botk", "botk_ind", "botk_indices", "bxor", "cat", "ceil", "cellular", "cellular_noise", "cielab_to_rgb", "clamp", "cnt", "concat", "concatenate", "conv", "convolution", "coordinates", "coords", "corr", "correlation", "cos", "cosh", "cosine_similarity", "cossim", "count", "cov", "crop", "cross", "cubic", "cubic_ease", "cumprod", "cumsum", "diag", "diagonal_matrix", "dilate", "dist", "distance", "domain_warp", "domain_warp_noise", "dot", "edge", "elastic", "elastic_ease", "endswith", "entropy", "erf", "erfinv", "erode", "exp", "ezconv", "ezconvolution", "fft", "find", "flatten", "flip", "float", "floor", "flow_ang", "flow_angle", "flow_apply", "flow_mag", "flow_magnitude", "flow_to_image", "fract", "gamma", "gaussian", "gelu", "get_value", "hist", "histogram", "hsv_to_rgb", "ifft", "int", "int_to_rgb", "interpolate_area", "interpolate_linear", "interpolate_nearest", "interpolate_nearest_exact", "join", "length", "lerp", "linspace", "ln", "log", "logspace", "lower", "map", "matmul", "mean", "median", "mode", "moment", "morph_close", "morph_open", "motion_mask", "nan_to_num", "noise", "now", "nvl", "oklab_to_rgb", "overlay", "pad", "percentile", "perlin", "perlin_noise", "perm", "permute", "pinv", "plasma", "plasma_noise", "popcnt", "popcount", "pow", "prcnt", "print", "print_shape", "pshp", "quantile", "quartil", "quartile", "rand", "randb", "randbeta", "randc", "rande", "randg", "randgumbel", "randchi2", "randl", "randln", "randn", "random_bernoulli", "random_beta", "random_cauchy", "random_exponential", "random_gamma", "random_gumbel", "random_chi2", "random_laplace", "random_log_normal", "random_normal", "random_poisson", "random_studentt", "random_uniform", "random_weibull", "randp", "randt", "randu", "randw", "range", "relu", "remap", "remove_key", "repeat", "replace", "reshape", "rgb_to_cielab", "rgb_to_hsv", "rgb_to_int", "rgb_to_oklab", "ridged", "ridged_noise", "rife", "rm_kay", "roll", "round", "rshp", "select", "shape", "shuffle", "sigm", "sign", "sin", "sine", "sine_ease", "singular_value_decomposition", "sinh", "smax", "smin", "smootherstep", "smoothstep", "snorm", "softmax", "softmin", "softplus", "sort", "split", "sqrt", "squeeze", "stack_clear", "stack_get", "stack_has", "stack_pop", "stack_push", "startswith", "std", "step", "substr", "substring", "sum", "svd", "swap", "tan", "tanh", "tensor", "text_image", "timestamp", "tmax", "tmin", "tnorm", "topk", "topk_ind", "topk_indices", "trim", "turbulence", "unique", "unsqueeze", "upper", "var", "voronoi", "voronoi_noise", "where", "worley"
|
||||
"abs", "acos", "acosh", "add_key", "all", "angle", "any", "append", "argmax", "argmin", "argsort", "as_nested_tensor", "asin", "asinh", "atan", "atan2", "atanh", "band", "batch_shuffle", "bitcount", "bitwise_and", "bitwise_not", "bitwise_or", "bitwise_xor", "blur", "bnot", "bor", "botk", "botk_ind", "botk_indices", "bxor", "cat", "ceil", "cellular", "cellular_noise", "cielab_to_rgb", "clamp", "cnt", "concat", "concatenate", "conv", "convolution", "coordinates", "coords", "corr", "correlation", "cos", "cosh", "cosine_similarity", "cossim", "count", "cov", "crop", "cross", "cubic", "cubic_ease", "cumprod", "cumsum", "diag", "diagonal_matrix", "dilate", "dist", "distance", "domain_warp", "domain_warp_noise", "dot", "edge", "elastic", "elastic_ease", "endswith", "entropy", "erf", "erfinv", "erode", "exp", "ezconv", "ezconvolution", "fft", "find", "flatten", "flip", "float", "floor", "flow_ang", "flow_angle", "flow_apply", "flow_mag", "flow_magnitude", "flow_to_image", "fract", "gamma", "gaussian", "gelu", "get_value", "hist", "histogram", "hsv_to_rgb", "ifft", "int", "int_to_rgb", "interpolate_area", "interpolate_linear", "interpolate_nearest", "interpolate_nearest_exact", "join", "keys", "length", "lerp", "linspace", "ln", "log", "logspace", "lower", "map", "matmul", "mean", "median", "mode", "moment", "morph_close", "morph_open", "motion_mask", "nan_to_num", "noise", "now", "nvl", "oklab_to_rgb", "overlay", "pad", "percentile", "perlin", "perlin_noise", "perm", "permute", "pinv", "plasma", "plasma_noise", "popcnt", "popcount", "pow", "prcnt", "print", "print_shape", "pshp", "quantile", "quartil", "quartile", "rand", "randb", "randbeta", "randc", "rande", "randg", "randgumbel", "randchi2", "randl", "randln", "randn", "random_bernoulli", "random_beta", "random_cauchy", "random_exponential", "random_gamma", "random_gumbel", "random_chi2", "random_laplace", "random_log_normal", "random_normal", "random_poisson", "random_studentt", "random_uniform", "random_weibull", "randp", "randt", "randu", "randw", "range", "relu", "remap", "remove_key", "repeat", "replace", "reshape", "rgb_to_cielab", "rgb_to_hsv", "rgb_to_int", "rgb_to_oklab", "ridged", "ridged_noise", "rife", "rm_kay", "roll", "round", "rshp", "select", "shape", "shuffle", "sigm", "sign", "sin", "sine", "sine_ease", "singular_value_decomposition", "sinh", "smax", "smin", "smootherstep", "smoothstep", "snorm", "softmax", "softmin", "softplus", "sort", "split", "sqrt", "squeeze", "stack_clear", "stack_get", "stack_has", "stack_pop", "stack_push", "startswith", "std", "step", "substr", "substring", "sum", "svd", "swap", "tan", "tanh", "tensor", "text_image", "timestamp", "tmax", "tmin", "tnorm", "topk", "topk_ind", "topk_indices", "trim", "turbulence", "unique", "unsqueeze", "upper", "var", "voronoi", "voronoi_noise", "where", "worley"
|
||||
]);
|
||||
|
||||
export const FUNCTION_META = {
|
||||
abs: { minArgs: 1, maxArgs: 1, snippet: "abs()", description: "abs(x) - applies per element absolute value function. Same as |x| for numbers." },
|
||||
acos: { minArgs: 1, maxArgs: 1, snippet: "acos()", description: "acos(x) - applies arcus cosinus function to value or each element of value" },
|
||||
acosh: { minArgs: 1, maxArgs: 1, snippet: "acosh()", description: "acosh(x) - applies hyperbolic arcus cosinus function to value or each element of value" },
|
||||
add_key: { minArgs: 3, maxArgs: 3, snippet: "add_key()", description: "add_key(dict, key, value) - adds or replaces a dictionary entry and returns the updated dictionary" },
|
||||
all: { minArgs: 1, maxArgs: 1, snippet: "all()", description: "all(x) - returns 1 if all elements of x are non-zero otherwise 0" },
|
||||
angle: { minArgs: 1, maxArgs: 1, snippet: "angle()", description: "angle(x) - returns the angle of a complex number or vector" },
|
||||
any: { minArgs: 1, maxArgs: 1, snippet: "any()", description: "any(x) - returns 1 if any element of x is non-zero otherwise 0" },
|
||||
append: { minArgs: 2, maxArgs: 2, snippet: "append()", description: "append(x, y) - appends y to the end of x. If inputs are tensors use concatenate(x,...,dim)" },
|
||||
argmax: { minArgs: 1, maxArgs: 2, snippet: "argmax()", description: "argmax(x, [as_position]) - returns the maximum position in flattened x or coordinates as a list when requested" },
|
||||
argmin: { minArgs: 1, maxArgs: 2, snippet: "argmin()", description: "argmin(x, [as_position]) - returns the minimum position in flattened x or coordinates as a list when requested" },
|
||||
argsort: { minArgs: 2, maxArgs: 3, snippet: "argsort()", description: "argsort(x, [desc], [dim]) - returns the indices that would sort x. desc defaults to ascending and dim defaults to the last dimension." },
|
||||
as_nested_tensor: { minArgs: 1, maxArgs: 1, snippet: "as_nested_tensor()", description: "as_nested(x) - converts a list to a nested tensor (special object containing tensors of different shapes behaving like a tensor)" },
|
||||
asin: { minArgs: 1, maxArgs: 1, snippet: "asin()", description: "asin(x) - applies arcus sinus function to value or each element of value" },
|
||||
asinh: { minArgs: 1, maxArgs: 1, snippet: "asinh()", description: "asinh(x) - applies hyperbolic arcus sinus function to value or each element of value" },
|
||||
atan: { minArgs: 1, maxArgs: 1, snippet: "atan()", description: "atan(x) - applies arcus tangents function to value or each element of value" },
|
||||
atan2: { minArgs: 2, maxArgs: 2, snippet: "atan2()", description: "atan2(y, x) - computes the arc tangent of y/x, using the signs of both arguments to determine the quadrant" },
|
||||
atanh: { minArgs: 1, maxArgs: 1, snippet: "atanh()", description: "atanh(x) - applies hyperbolic arcus tangents function to value or each element of value" },
|
||||
band: { minArgs: 2, maxArgs: 2, snippet: "band()", description: "bitwise_and(x, y) - computes the element-wise bitwise AND of x and y" },
|
||||
batch_shuffle: { minArgs: 2, maxArgs: 2, snippet: "batch_shuffle()", description: "batch_shuffle(x, indices) - shuffles and duplicates or skips the batch dimension of x according to indices" },
|
||||
bitcount: { minArgs: 1, maxArgs: 1, snippet: "bitcount()", description: "bitcount(x) - returns the number of set bits" },
|
||||
bitwise_and: { minArgs: 2, maxArgs: 2, snippet: "bitwise_and()", description: "bitwise_and(x, y) - computes the element-wise bitwise AND of x and y" },
|
||||
bitwise_not: { minArgs: 1, maxArgs: 1, snippet: "bitwise_not()", description: "bnot(x) - computes the bitwise NOT" },
|
||||
bitwise_or: { minArgs: 2, maxArgs: 2, snippet: "bitwise_or()", description: "bitwise_or(x, y) - computes the element-wise bitwise OR of x and y" },
|
||||
bitwise_xor: { minArgs: 2, maxArgs: 2, snippet: "bitwise_xor()", description: "bitwise_xor(x, y) - computes the element-wise bitwise XOR of x and y" },
|
||||
blur: { minArgs: 2, maxArgs: 3, snippet: "blur()", description: "gaussian(x, sigma, [reshape]) - applies a Gaussian blur to x with specified sigma. if reshape has value of 1.0, then it tries orienting the input such that channel is in the direction of filter. Otherwise it expect color dimension to be the last." },
|
||||
bnot: { minArgs: 1, maxArgs: 1, snippet: "bnot()", description: "bnot(x) - computes the bitwise NOT" },
|
||||
bor: { minArgs: 2, maxArgs: 2, snippet: "bor()", description: "bitwise_or(x, y) - computes the element-wise bitwise OR of x and y" },
|
||||
botk: { minArgs: 2, maxArgs: 2, snippet: "botk()", description: "botk(x, k) - returns the k smallest elements of x. For tensors it keeps them in place." },
|
||||
botk_ind: { minArgs: 2, maxArgs: 2, snippet: "botk_ind()", description: "botk_indices(x, k) - returns the indices of the k smallest elements of x" },
|
||||
botk_indices: { minArgs: 2, maxArgs: 2, snippet: "botk_indices()", description: "botk_indices(x, k) - returns the indices of the k smallest elements of x" },
|
||||
bxor: { minArgs: 2, maxArgs: 2, snippet: "bxor()", description: "bitwise_xor(x, y) - computes the element-wise bitwise XOR of x and y" },
|
||||
cat: { minArgs: 2, maxArgs: null, snippet: "cat()", description: "concatenate(x1, x2, ..., dim) - concatenates tensors along the specified dimension" },
|
||||
ceil: { minArgs: 1, maxArgs: 1, snippet: "ceil()", description: "ceil(x) - returns the smallest integer greater than or equal to x" },
|
||||
cellular: { minArgs: 2, maxArgs: 5, snippet: "cellular()", description: "cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise" },
|
||||
cellular_noise: { minArgs: 2, maxArgs: 5, snippet: "cellular_noise()", description: "cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise" },
|
||||
cielab_to_rgb: { minArgs: 1, maxArgs: 3, snippet: "cielab_to_rgb()", description: "cielab_to_rgb(cielab) / cielab_to_rgb(l, a, b) - converts CIELAB to RGB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting." },
|
||||
clamp: { minArgs: 3, maxArgs: 3, snippet: "clamp()", description: "clamp(x, min, max) - clamps x between min and max per element" },
|
||||
cnt: { minArgs: 1, maxArgs: 1, snippet: "cnt()", description: "count(x) - returns the number of elements in x" },
|
||||
concat: { minArgs: 2, maxArgs: null, snippet: "concat()", description: "concatenate(x1, x2, ..., dim) - concatenates tensors along the specified dimension" },
|
||||
concatenate: { minArgs: 2, maxArgs: null, snippet: "concatenate()", description: "concatenate(x1, x2, ..., dim) - concatenates tensors along the specified dimension" },
|
||||
conv: { minArgs: 2, maxArgs: null, snippet: "conv()", description: "convolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Expects [batch,channel, ...]" },
|
||||
convolution: { minArgs: 2, maxArgs: null, snippet: "convolution()", description: "convolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Expects [batch,channel, ...]" },
|
||||
coordinates: { minArgs: 2, maxArgs: 3, snippet: "coordinates()", description: "coords(shape, dim, [dtype]) - generates a tensor with the specified shape whose values are the coordinates of each element along the specified dimension. The dtype can be specified to control the data type of the output tensor." },
|
||||
coords: { minArgs: 2, maxArgs: 3, snippet: "coords()", description: "coords(shape, dim, [dtype]) - generates a tensor with the specified shape whose values are the coordinates of each element along the specified dimension. The dtype can be specified to control the data type of the output tensor." },
|
||||
corr: { minArgs: 2, maxArgs: 2, snippet: "corr()", description: "correlation(x, y) - computes the correlation between x and y" },
|
||||
correlation: { minArgs: 2, maxArgs: 2, snippet: "correlation()", description: "correlation(x, y) - computes the correlation between x and y" },
|
||||
cos: { minArgs: 1, maxArgs: 1, snippet: "cos()", description: "cos(x) - applies cosinus function to value or each element of value" },
|
||||
cosh: { minArgs: 1, maxArgs: 1, snippet: "cosh()", description: "cosh(x) - applies hyperbolic cosinus function to value or each element of value" },
|
||||
cosine_similarity: { minArgs: 2, maxArgs: 2, snippet: "cosine_similarity()", description: "cosine_similarity(x, y) - computes the cosine similarity between x and y." },
|
||||
cossim: { minArgs: 2, maxArgs: 2, snippet: "cossim()", description: "cosine_similarity(x, y) - computes the cosine similarity between x and y." },
|
||||
count: { minArgs: 1, maxArgs: 1, snippet: "count()", description: "count(x) - returns the number of elements in x" },
|
||||
cov: { minArgs: 2, maxArgs: 2, snippet: "cov()", description: "cov(x, y) - computes the covariance matrix of x and y" },
|
||||
crop: { minArgs: 3, maxArgs: 3, snippet: "crop()", description: "crop(x, start, size) - crops tensor x. Take size and begin at start. start should be the low corner. The result is at most size (if size is bigger then rest of tensor)." },
|
||||
cross: { minArgs: 2, maxArgs: 2, snippet: "cross()", description: "cross(x, y) - computes the cross product of x and y. Last dimension must be 3" },
|
||||
cubic: { minArgs: 3, maxArgs: 3, snippet: "cubic()", description: "cubic_ease(a, b, t) - cubic ease between a and b" },
|
||||
cubic_ease: { minArgs: 3, maxArgs: 3, snippet: "cubic_ease()", description: "cubic_ease(a, b, t) - cubic ease between a and b" },
|
||||
cumprod: { minArgs: 1, maxArgs: 1, snippet: "cumprod()", description: "cumprod(x) - computes the cumulative product over first dimension." },
|
||||
cumsum: { minArgs: 1, maxArgs: 2, snippet: "cumsum()", description: "cumsum(x, [dim]) - computes the cumulative sum, defaulting to the first dimension." },
|
||||
diag: { minArgs: 4, maxArgs: 5, snippet: "diag()", description: "diagonal_matrix(x, shape, [offset], [dim1], [dim2]) - creates a diagonal matrix from x with specified shape. offset is the diagonal offset. dim1 and dim2 are the dimensions to place the diagonal on." },
|
||||
diagonal_matrix: { minArgs: 4, maxArgs: 5, snippet: "diagonal_matrix()", description: "diagonal_matrix(x, shape, [offset], [dim1], [dim2]) - creates a diagonal matrix from x with specified shape. offset is the diagonal offset. dim1 and dim2 are the dimensions to place the diagonal on." },
|
||||
dilate: { minArgs: 1, maxArgs: 2, snippet: "dilate()", description: "dilate(x, [kernel]) - applies dilation to x. kernel is optional." },
|
||||
dist: { minArgs: 4, maxArgs: 4, snippet: "dist()", description: "distance(x1, y1, x2, y2) - computes Euclidean distance between (x1, y1) and (x2, y2)" },
|
||||
distance: { minArgs: 4, maxArgs: 4, snippet: "distance()", description: "distance(x1, y1, x2, y2) - computes Euclidean distance between (x1, y1) and (x2, y2)" },
|
||||
domain_warp: { minArgs: 4, maxArgs: 8, snippet: "domain_warp()", description: "domain_warp_noise(seed, scale, warp_scale, warp_strength, [octaves], [warp_octaves], [offset], [shape]) - generates domain warped noise" },
|
||||
domain_warp_noise: { minArgs: 4, maxArgs: 8, snippet: "domain_warp_noise()", description: "domain_warp_noise(seed, scale, warp_scale, warp_strength, [octaves], [warp_octaves], [offset], [shape]) - generates domain warped noise" },
|
||||
dot: { minArgs: 2, maxArgs: 2, snippet: "dot()", description: "dot(x, y) - computes the dot product of x and y. Last dimension must be 3." },
|
||||
edge: { minArgs: 1, maxArgs: 2, snippet: "edge()", description: "edge(x, [matrix_size]) - detects edges in x. Matrix size denotes the size of edge detection matrix." },
|
||||
elastic: { minArgs: 3, maxArgs: 3, snippet: "elastic()", description: "elastic_ease(a, b, t) - elastic ease between a and b" },
|
||||
elastic_ease: { minArgs: 3, maxArgs: 3, snippet: "elastic_ease()", description: "elastic_ease(a, b, t) - elastic ease between a and b" },
|
||||
endswith: { minArgs: 2, maxArgs: 2, snippet: "endswith()", description: "endswith(text, suffix) - returns 1 if text ends with suffix, else 0" },
|
||||
entropy: { minArgs: 1, maxArgs: 1, snippet: "entropy()", description: "entropy(x) - computes shanon entropy" },
|
||||
erf: { minArgs: 1, maxArgs: 1, snippet: "erf()", description: "erf(x) - computes the error function (torch.erf)" },
|
||||
erfinv: { minArgs: 1, maxArgs: 1, snippet: "erfinv()", description: "erfinv(x) - computes the inverse error function (torch.erfinv)" },
|
||||
erode: { minArgs: 1, maxArgs: 2, snippet: "erode()", description: "erode(x, [kernel]) - applies erosion to x. kernel is size of used matrix." },
|
||||
exp: { minArgs: 1, maxArgs: 1, snippet: "exp()", description: "exp(x) - applies e^x to value (per element)" },
|
||||
ezconv: { minArgs: 2, maxArgs: null, snippet: "ezconv()", description: "ezconvolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Attempts to correctly convolve over size dimensions." },
|
||||
ezconvolution: { minArgs: 2, maxArgs: null, snippet: "ezconvolution()", description: "ezconvolution(tensor, [kernel_sizes...], kernel) - applies convolution with kernel. Attempts to correctly convolve over size dimensions." },
|
||||
fft: { minArgs: 1, maxArgs: 1, snippet: "fft()", description: "fft(x) - computes fast Fourier transform of x" },
|
||||
find: { minArgs: 2, maxArgs: 2, snippet: "find()", description: "find(s, sub) - returns the index of the first occurrence of sub in s. -1 if not found. Works only for strings." },
|
||||
flatten: { minArgs: 1, maxArgs: 1, snippet: "flatten()", description: "flatten(x) - flattens tensor into a 1D tensor" },
|
||||
flip: { minArgs: 2, maxArgs: 2, snippet: "flip()", description: "flip(x, dims) - reverses the order of elements along the specified dimensions. Works also for text and list with dims=0" },
|
||||
float: { minArgs: 1, maxArgs: 1, snippet: "float()", description: "float(x) - casts x to float" },
|
||||
floor: { minArgs: 1, maxArgs: 1, snippet: "floor()", description: "floor(x) - returns the largest integer less than or equal to x" },
|
||||
flow_ang: { minArgs: 1, maxArgs: 1, snippet: "flow_ang()", description: "flow_angle(x) - computes the angle of optical flow (basically angle() but real and imaginery is separate in 2 dimensions)" },
|
||||
flow_angle: { minArgs: 1, maxArgs: 1, snippet: "flow_angle()", description: "flow_angle(x) - computes the angle of optical flow (basically angle() but real and imaginery is separate in 2 dimensions)" },
|
||||
flow_apply: { minArgs: 2, maxArgs: 2, snippet: "flow_apply()", description: "flow_apply(image, flow) - applies optical flow to an image" },
|
||||
flow_mag: { minArgs: 1, maxArgs: 1, snippet: "flow_mag()", description: "flow_magnitude(x) - computes the magnitude of optical flow (or any other structure with last dimension of 2)" },
|
||||
flow_magnitude: { minArgs: 1, maxArgs: 1, snippet: "flow_magnitude()", description: "flow_magnitude(x) - computes the magnitude of optical flow (or any other structure with last dimension of 2)" },
|
||||
flow_to_image: { minArgs: 1, maxArgs: 1, snippet: "flow_to_image()", description: "flow_to_image(x) - converts optical flow x to an RGB image. Up-Down is blue-yellow Left-right green-magenta." },
|
||||
fract: { minArgs: 1, maxArgs: 1, snippet: "fract()", description: "fract(x) - returns the fractional part of x: x - floor(x)" },
|
||||
gamma: { minArgs: 1, maxArgs: 1, snippet: "gamma()", description: "gamma(x) - computes the gamma function (per element)" },
|
||||
gaussian: { minArgs: 2, maxArgs: 3, snippet: "gaussian()", description: "gaussian(x, sigma, [reshape]) - applies a Gaussian blur to x with specified sigma. if reshape has value of 1.0, then it tries orienting the input such that channel is in the direction of filter. Otherwise it expect color dimension to be the last." },
|
||||
gelu: { minArgs: 1, maxArgs: 1, snippet: "gelu()", description: "gelu(x) - applies the Gaussian Error Linear Unit (GELU) activation function" },
|
||||
get_value: { minArgs: 2, maxArgs: 2, snippet: "get_value()", description: "get_value(slot) - returns the value at slot from stack" },
|
||||
hist: { minArgs: 4, maxArgs: 4, snippet: "hist()", description: "histogram(x, bins, min, max) - computes histogram" },
|
||||
histogram: { minArgs: 4, maxArgs: 4, snippet: "histogram()", description: "histogram(x, bins, min, max) - computes histogram" },
|
||||
hsv_to_rgb: { minArgs: 1, maxArgs: 4, snippet: "hsv_to_rgb()", description: "hsv_to_rgb(hsv, [degrees]) / hsv_to_rgb(h, s, v, [degrees]) - converts HSV to RGB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting." },
|
||||
ifft: { minArgs: 1, maxArgs: 2, snippet: "ifft()", description: "ifft(x, [axis]) - inverse fast Fourier transform" },
|
||||
int: { minArgs: 1, maxArgs: 1, snippet: "int()", description: "int(x) - casts x to integer" },
|
||||
int_to_rgb: { minArgs: 1, maxArgs: 1, snippet: "int_to_rgb()", description: "int_to_rgb(val) - converts an integer to an RGB color. If input is tensor it stacks the resulting R, G and B tensors using last dimension. If It is list, List of lists is returned and if value, 3 long list is returned." },
|
||||
interpolate_area: { minArgs: 2, maxArgs: 2, snippet: "interpolate_area()", description: "interpolate_area(x, y) - performs area interpolation X. Assumes that dim 0 is batch and dim 1 = channel" },
|
||||
interpolate_linear: { minArgs: 2, maxArgs: 2, snippet: "interpolate_linear()", description: "interpolate_linear(x, y) - performs linear interpolation on X. Assumes that dim 0 is batch and dim 1 = channel" },
|
||||
interpolate_nearest: { minArgs: 2, maxArgs: 2, snippet: "interpolate_nearest()", description: "interpolate_nearest_exact(x, y) - performs nearest neighbor interpolation X. Assumes that dim 0 is batch and dim 1 = channel" },
|
||||
interpolate_nearest_exact: { minArgs: 2, maxArgs: 2, snippet: "interpolate_nearest_exact()", description: "interpolate_nearest_exact(x, y) - performs nearest neighbor interpolation X. Assumes that dim 0 is batch and dim 1 = channel" },
|
||||
join: { minArgs: 1, maxArgs: 2, snippet: "join()", description: "join(x, [separator]) - joins strings in list using separator. Defalut separator is \"\". If you want to join tensors use concatinate(...)" },
|
||||
length: { minArgs: 1, maxArgs: 1, snippet: "length()", description: "count(x) - returns the number of elements in x" },
|
||||
lerp: { minArgs: 3, maxArgs: 3, snippet: "lerp()", description: "lerp(a, b, t) - linear interpolation between a and b by t per element. t can be float or tensor." },
|
||||
linspace: { minArgs: 3, maxArgs: 3, snippet: "linspace()", description: "linspace(start, stop, num) - creates num linearly spaced values from start to stop (inclusive). Use range if you want to control the step between values." },
|
||||
ln: { minArgs: 1, maxArgs: 1, snippet: "ln()", description: "ln(x) - applies natural logarithm to value (per element). Negative numbers return NaN (not a number)" },
|
||||
log: { minArgs: 1, maxArgs: 1, snippet: "log()", description: "log(x) - applies base 10 logarithm to value (per element). Negative numbers return NaN (not a number)" },
|
||||
logspace: { minArgs: 4, maxArgs: 4, snippet: "logspace()", description: "logspace(start, stop, num, base) - creates logarithmically spaced values" },
|
||||
lower: { minArgs: 1, maxArgs: 1, snippet: "lower()", description: "lower(x) - converts string to lowercase" },
|
||||
map: { minArgs: 2, maxArgs: null, snippet: "map()", description: "map(tensor, coord1, [coord2], [coord3]) - samples/remaps input tensor using coordinates" },
|
||||
matmul: { minArgs: 2, maxArgs: 2, snippet: "matmul()", description: "matmul(x, y) - computes the matrix multiplication of x and y" },
|
||||
mean: { minArgs: 1, maxArgs: 1, snippet: "mean()", description: "mean(x) - computes the arithmetic mean of elements of x" },
|
||||
median: { minArgs: 1, maxArgs: 1, snippet: "median()", description: "median(x) - computes the median of elements of x" },
|
||||
mode: { minArgs: 1, maxArgs: 1, snippet: "mode()", description: "mode(x) - computes the mode of elements of x" },
|
||||
moment: { minArgs: 3, maxArgs: 3, snippet: "moment()", description: "moment(x, a, k) - computes the k-th moment of x around a" },
|
||||
morph_close: { minArgs: 1, maxArgs: 2, snippet: "morph_close()", description: "morph_close(x, [kernel]) - applies morphological closing to x. kernel is size of used matrix." },
|
||||
morph_open: { minArgs: 1, maxArgs: 2, snippet: "morph_open()", description: "morph_open(x, [kernel]) - applies morphological opening to x. kernel is size of used matrix." },
|
||||
motion_mask: { minArgs: 1, maxArgs: 1, snippet: "motion_mask()", description: "motion_mask(x) - generates a motion mask from optical flow" },
|
||||
nan_to_num: { minArgs: 4, maxArgs: 4, snippet: "nan_to_num()", description: "nan_to_num(x, nan, pos_inf, neg_inf) - null value replacement - inspired by NVL" },
|
||||
noise: { minArgs: 1, maxArgs: 2, snippet: "noise()", description: "random_normal(seed, [shape]) - generates normally distributed random noise" },
|
||||
now: { minArgs: 0, maxArgs: 0, snippet: "now()", description: "timestamp() - returns the current system timestamp" },
|
||||
nvl: { minArgs: 4, maxArgs: 4, snippet: "nvl()", description: "nan_to_num(x, nan, pos_inf, neg_inf) - null value replacement - inspired by NVL" },
|
||||
oklab_to_rgb: { minArgs: 1, maxArgs: 3, snippet: "oklab_to_rgb()", description: "oklab_to_rgb(oklab) / oklab_to_rgb(l, a, b) - converts OKLab to RGB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting." },
|
||||
overlay: { minArgs: 3, maxArgs: 4, snippet: "overlay()", description: "overlay(base, overlay, offset, [opacity]) - overlays overlay on base at offset. Opacity controls blending. It can be tensor or float. If it is tensor it should be the same shape as overlay." },
|
||||
pad: { minArgs: 2, maxArgs: 2, snippet: "pad()", description: "pad(x, padding) - pads tensor x with specified padding (dim 0 neg, dim 0 pos, dim 1 ...)" },
|
||||
percentile: { minArgs: 2, maxArgs: 2, snippet: "percentile()", description: "percentile(x, p) - computes the p-th percentile of x" },
|
||||
perlin: { minArgs: 2, maxArgs: 5, snippet: "perlin()", description: "perlin_noise(seed, scale, [octaves], [offset], [shape]) - generates Perlin noise" },
|
||||
perlin_noise: { minArgs: 2, maxArgs: 5, snippet: "perlin_noise()", description: "perlin_noise(seed, scale, [octaves], [offset], [shape]) - generates Perlin noise" },
|
||||
perm: { minArgs: 2, maxArgs: 2, snippet: "perm()", description: "permute(x, dims) - permutes the dimensions of tensor x according to dims" },
|
||||
permute: { minArgs: 2, maxArgs: 2, snippet: "permute()", description: "permute(x, dims) - permutes the dimensions of tensor x according to dims" },
|
||||
pinv: { minArgs: 1, maxArgs: 1, snippet: "pinv()", description: "pinv(x) - computes the permutative inverse of a list x (list must have uniqe elements) -- TODO: CHECK --" },
|
||||
plasma: { minArgs: 2, maxArgs: 5, snippet: "plasma()", description: "plasma_noise(seed, scale, [octaves], [offset], [shape]) - generates Plasma/Turbulence noise - same as perlin but default octaves 4" },
|
||||
plasma_noise: { minArgs: 2, maxArgs: 5, snippet: "plasma_noise()", description: "plasma_noise(seed, scale, [octaves], [offset], [shape]) - generates Plasma/Turbulence noise - same as perlin but default octaves 4" },
|
||||
popcnt: { minArgs: 1, maxArgs: 1, snippet: "popcnt()", description: "bitcount(x) - returns the number of set bits" },
|
||||
popcount: { minArgs: 1, maxArgs: 1, snippet: "popcount()", description: "bitcount(x) - returns the number of set bits" },
|
||||
pow: { minArgs: 2, maxArgs: 2, snippet: "pow()", description: "pow(x, y) - computes x raised to the power of y" },
|
||||
prcnt: { minArgs: 2, maxArgs: 2, snippet: "prcnt()", description: "percentile(x, p) - computes the p-th percentile of x" },
|
||||
print: { minArgs: 1, maxArgs: 1, snippet: "print()", description: "print(x) - prints the value of x to the console while passing output unchanged" },
|
||||
print_shape: { minArgs: 1, maxArgs: 1, snippet: "print_shape()", description: "print_shape(x) - prints the shape of the tensor x" },
|
||||
pshp: { minArgs: 1, maxArgs: 1, snippet: "pshp()", description: "print_shape(x) - prints the shape of the tensor x" },
|
||||
quantile: { minArgs: 2, maxArgs: 2, snippet: "quantile()", description: "quantile(x, q) - computes the q-th quantile of x" },
|
||||
quartil: { minArgs: 2, maxArgs: 2, snippet: "quartil()", description: "quartile(x, q) - computes the q-th quartile of x" },
|
||||
quartile: { minArgs: 2, maxArgs: 2, snippet: "quartile()", description: "quartile(x, q) - computes the q-th quartile of x" },
|
||||
rand: { minArgs: 1, maxArgs: 2, snippet: "rand()", description: "random_uniform(seed, [shape]) - generates uniformly distributed random noise" },
|
||||
randb: { minArgs: 2, maxArgs: 3, snippet: "randb()", description: "random_bernoulli(seed, probability, [shape]) - generates Bernoulli distributed random values (0 or 1). Probability can be a tensor" },
|
||||
randbeta: { minArgs: 3, maxArgs: 4, snippet: "randbeta()", description: "random_beta(seed, alpha, beta, [shape]) - generates Beta distributed random values" },
|
||||
randc: { minArgs: 3, maxArgs: 4, snippet: "randc()", description: "random_cauchy(seed, median, sigma, [shape]) - generates Cauchy distributed random values." },
|
||||
rande: { minArgs: 2, maxArgs: 3, snippet: "rande()", description: "random_exponential(seed, lambda, [shape]) - generates exponentially distributed random values" },
|
||||
randg: { minArgs: 3, maxArgs: 4, snippet: "randg()", description: "random_gamma(seed, shape_param, scale, [shape]) - generates Gamma distributed random values." },
|
||||
randgumbel: { minArgs: 3, maxArgs: 4, snippet: "randgumbel()", description: "random_gumbel(seed, loc, scale, [shape]) - generates Gumbel distributed random values" },
|
||||
randchi2: { minArgs: 2, maxArgs: 3, snippet: "randchi2()", description: "random_chi2(seed, df, [shape]) - generates Chi-squared distributed random values" },
|
||||
randl: { minArgs: 3, maxArgs: 4, snippet: "randl()", description: "random_laplace(seed, loc, scale, [shape]) - generates Laplace distributed random values" },
|
||||
randln: { minArgs: 3, maxArgs: 4, snippet: "randln()", description: "random_log_normal(seed, mean, std, [shape]) - generates log-normally distributed random values." },
|
||||
randn: { minArgs: 1, maxArgs: 2, snippet: "randn()", description: "random_normal(seed, [shape]) - generates normally distributed random noise" },
|
||||
random_bernoulli: { minArgs: 2, maxArgs: 3, snippet: "random_bernoulli()", description: "random_bernoulli(seed, probability, [shape]) - generates Bernoulli distributed random values (0 or 1). Probability can be a tensor" },
|
||||
random_beta: { minArgs: 3, maxArgs: 4, snippet: "random_beta()", description: "random_beta(seed, alpha, beta, [shape]) - generates Beta distributed random values" },
|
||||
random_cauchy: { minArgs: 3, maxArgs: 4, snippet: "random_cauchy()", description: "random_cauchy(seed, median, sigma, [shape]) - generates Cauchy distributed random values." },
|
||||
random_exponential: { minArgs: 2, maxArgs: 3, snippet: "random_exponential()", description: "random_exponential(seed, lambda, [shape]) - generates exponentially distributed random values" },
|
||||
random_gamma: { minArgs: 3, maxArgs: 4, snippet: "random_gamma()", description: "random_gamma(seed, shape_param, scale, [shape]) - generates Gamma distributed random values." },
|
||||
random_gumbel: { minArgs: 3, maxArgs: 4, snippet: "random_gumbel()", description: "random_gumbel(seed, loc, scale, [shape]) - generates Gumbel distributed random values" },
|
||||
random_chi2: { minArgs: 2, maxArgs: 3, snippet: "random_chi2()", description: "random_chi2(seed, df, [shape]) - generates Chi-squared distributed random values" },
|
||||
random_laplace: { minArgs: 3, maxArgs: 4, snippet: "random_laplace()", description: "random_laplace(seed, loc, scale, [shape]) - generates Laplace distributed random values" },
|
||||
random_log_normal: { minArgs: 3, maxArgs: 4, snippet: "random_log_normal()", description: "random_log_normal(seed, mean, std, [shape]) - generates log-normally distributed random values." },
|
||||
random_normal: { minArgs: 1, maxArgs: 2, snippet: "random_normal()", description: "random_normal(seed, [shape]) - generates normally distributed random noise" },
|
||||
random_poisson: { minArgs: 2, maxArgs: 3, snippet: "random_poisson()", description: "random_poisson(seed, lambda, [shape]) - generates Poisson distributed random values." },
|
||||
random_studentt: { minArgs: 2, maxArgs: 3, snippet: "random_studentt()", description: "random_studentt(seed, df, [shape]) - generates Student-t distributed random values" },
|
||||
random_uniform: { minArgs: 1, maxArgs: 2, snippet: "random_uniform()", description: "random_uniform(seed, [shape]) - generates uniformly distributed random noise" },
|
||||
random_weibull: { minArgs: 3, maxArgs: 4, snippet: "random_weibull()", description: "random_weibull(seed, scale, concentration, [shape]) - generates Weibull distributed random values" },
|
||||
randp: { minArgs: 2, maxArgs: 3, snippet: "randp()", description: "random_poisson(seed, lambda, [shape]) - generates Poisson distributed random values." },
|
||||
randt: { minArgs: 2, maxArgs: 3, snippet: "randt()", description: "random_studentt(seed, df, [shape]) - generates Student-t distributed random values" },
|
||||
randu: { minArgs: 1, maxArgs: 2, snippet: "randu()", description: "random_uniform(seed, [shape]) - generates uniformly distributed random noise" },
|
||||
randw: { minArgs: 3, maxArgs: 4, snippet: "randw()", description: "random_weibull(seed, scale, concentration, [shape]) - generates Weibull distributed random values" },
|
||||
range: { minArgs: 3, maxArgs: 3, snippet: "range()", description: "range(start, stop, step) - creates a range of values between start (inclusive) and stop (exclusive) using step. Use linspace if you want value count." },
|
||||
relu: { minArgs: 1, maxArgs: 1, snippet: "relu()", description: "relu(x) - applies rectified linear unit function: max(0, x)" },
|
||||
remap: { minArgs: 5, maxArgs: 5, snippet: "remap()", description: "remap(v, i_min, i_max, o_min, o_max) - remaps values from input range to output range" },
|
||||
remove_key: { minArgs: 2, maxArgs: 2, snippet: "remove_key()", description: "remove_key(dict, key) - removes a dictionary entry and returns the updated dictionary" },
|
||||
repeat: { minArgs: 2, maxArgs: 3, snippet: "repeat()", description: "repeat(x, count, [dims]) - repeats tensor elements; count may be scalar or per-dim list" },
|
||||
replace: { minArgs: 3, maxArgs: 3, snippet: "replace()", description: "replace(s, old, new) - replaces occurrences of old with new in s. Mostly for strings but can work with lists and tensors." },
|
||||
reshape: { minArgs: 2, maxArgs: 2, snippet: "reshape()", description: "reshape(x, shape) - reshapes tensor x to the specified shape" },
|
||||
rgb_to_cielab: { minArgs: 1, maxArgs: 3, snippet: "rgb_to_cielab()", description: "rgb_to_cielab(r, [g], [b]) - converts RGB to CIELAB. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting." },
|
||||
rgb_to_hsv: { minArgs: 1, maxArgs: 4, snippet: "rgb_to_hsv()", description: "rgb_to_hsv(rgb, [degrees]) / rgb_to_hsv(r, g, b, [degrees]) - converts RGB to HSV. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting. If degrees is specified and nonzero it returns hue as 0-360 instead of 0-1" },
|
||||
rgb_to_int: { minArgs: 1, maxArgs: 3, snippet: "rgb_to_int()", description: "rgb_to_int(r, [g, b]) - converts RGB components to an integer It uses last dimension of tensor (or list) as R,G,B if one value. Othervise uses whole thing as channel." },
|
||||
rgb_to_oklab: { minArgs: 1, maxArgs: 3, snippet: "rgb_to_oklab()", description: "rgb_to_oklab(r, [g], [b]) - converts RGB to OKLab. It has 2 modes. Aither 1 or 3 parameters. With 1 parameter it expects last dimension of 3 and with 3 it concatinates them after converting." },
|
||||
ridged: { minArgs: 2, maxArgs: 5, snippet: "ridged()", description: "ridged_noise(seed, scale, [octaves], [offset], [shape]) - generates ridged multi-fractal noise" },
|
||||
ridged_noise: { minArgs: 2, maxArgs: 5, snippet: "ridged_noise()", description: "ridged_noise(seed, scale, [octaves], [offset], [shape]) - generates ridged multi-fractal noise" },
|
||||
rife: { minArgs: 4, maxArgs: 5, snippet: "rife()", description: "rife(image1, image2, [tile_size], [iterations], [multi_scale]) - computes an intermediate frame between image1 and image2 using RIFE - tile_size: chuncks image to overlapping tile_size*tile_size parts to conserve memory Default is 1024x1024 when over 2MPx. When tiling size is between 0 - 1 it takes as a fraction of the resolution - iterations: how many times to run RIFE model. Default 12 - multi_scale: also use low resolution of base image for giant movements" },
|
||||
rm_kay: { minArgs: 2, maxArgs: 2, snippet: "rm_kay()", description: "remove_key(dict, key) - removes a dictionary entry and returns the updated dictionary" },
|
||||
roll: { minArgs: 2, maxArgs: 3, snippet: "roll()", description: "roll(x, shifts, [axis]) - rolls tensor x along axis" },
|
||||
round: { minArgs: 1, maxArgs: 1, snippet: "round()", description: "round(x) - rounds x to the nearest integer" },
|
||||
rshp: { minArgs: 2, maxArgs: 2, snippet: "rshp()", description: "reshape(x, shape) - reshapes tensor x to the specified shape" },
|
||||
select: { minArgs: 2, maxArgs: 2, snippet: "select()", description: "batch_shuffle(x, indices) - shuffles and duplicates or skips the batch dimension of x according to indices" },
|
||||
shape: { minArgs: 1, maxArgs: 1, snippet: "shape()", description: "shape(x) - returns the shape of tensor as a list" },
|
||||
shuffle: { minArgs: 2, maxArgs: 2, snippet: "shuffle()", description: "batch_shuffle(x, indices) - shuffles and duplicates or skips the batch dimension of x according to indices" },
|
||||
sigm: { minArgs: 1, maxArgs: 1, snippet: "sigm()", description: "sigm(x) - applies the sigmoid function: 1 / (1 + exp(-x))" },
|
||||
sign: { minArgs: 1, maxArgs: 1, snippet: "sign()", description: "sign(x) - returns the sign of x: -1, 0, or 1" },
|
||||
sin: { minArgs: 1, maxArgs: 1, snippet: "sin()", description: "sin(x) - applies sinus function to value or each element of value" },
|
||||
sine: { minArgs: 3, maxArgs: 3, snippet: "sine()", description: "sine_ease(a, b, t) - sine easing between a and b" },
|
||||
sine_ease: { minArgs: 3, maxArgs: 3, snippet: "sine_ease()", description: "sine_ease(a, b, t) - sine easing between a and b" },
|
||||
singular_value_decomposition: { minArgs: 1, maxArgs: 2, snippet: "singular_value_decomposition()", description: "svd(x, [full_matrices]) - computes the singular value decomposition of x. Returns a list of 3 tensors: U, S, V such that x = matmul(matmul(U, diagonal_matrix(S,shape(U))), V)" },
|
||||
sinh: { minArgs: 1, maxArgs: 1, snippet: "sinh()", description: "sinh(x) - applies hyperbolic sinus function to value or each element of value" },
|
||||
smax: { minArgs: 1, maxArgs: null, snippet: "smax()", description: "smax(x, ...) - computes the maximum of inputs or elements. Tensors must have the same size or be broadcastable to same size." },
|
||||
smin: { minArgs: 1, maxArgs: null, snippet: "smin()", description: "smin(x, ...) - computes the minimum of inputs or elements. Tensors must have the same size or be broadcastable to same size." },
|
||||
smootherstep: { minArgs: 3, maxArgs: 3, snippet: "smootherstep()", description: "smootherstep(x, edge0, edge1) - smoother interpolation between edge0 and edge1" },
|
||||
smoothstep: { minArgs: 3, maxArgs: 3, snippet: "smoothstep()", description: "smoothstep(x, edge0, edge1) - smooth interpolation between edge0 and edge1" },
|
||||
snorm: { minArgs: 1, maxArgs: 2, snippet: "snorm()", description: "snorm(x,[dim]) - frobenius norm of tensor. Along dimension if dimension specified. Dimension can be a list. Defaults to no dimension." },
|
||||
softmax: { minArgs: 1, maxArgs: 2, snippet: "softmax()", description: "softmax(x, [axis]) - applies the softmax function to x (sum of slice == 1.0 and max value <= 1.0). axis defaults to last." },
|
||||
softmin: { minArgs: 1, maxArgs: 2, snippet: "softmin()", description: "softmin(x, [axis]) - applies the softmin function to x (same as softmax(-x,[axis])). axis defaults to last." },
|
||||
softplus: { minArgs: 1, maxArgs: 1, snippet: "softplus()", description: "softplus(x) - applies the softplus function: ln(1 + exp(x))" },
|
||||
sort: { minArgs: 2, maxArgs: 3, snippet: "sort()", description: "sort(x, [desc], [dim]) - returns a sorted version of x (If input is tensor, it sorts the last dimension)" },
|
||||
split: { minArgs: 1, maxArgs: 2, snippet: "split()", description: "split(x, [delimiter]) - splits string to list of strings based on delimiter. Default is space." },
|
||||
sqrt: { minArgs: 1, maxArgs: 1, snippet: "sqrt()", description: "sqrt(x) - applies sqere root per element. Negative numbers return NaN (not a number)" },
|
||||
squeeze: { minArgs: 1, maxArgs: 2, snippet: "squeeze()", description: "squeeze(x, [dim]) - removes size-1 dimensions from tensor x, optionally at dim" },
|
||||
stack_clear: { minArgs: 1, maxArgs: 1, snippet: "stack_clear()", description: "stack_clear(slot) - clears the contents of slot stack" },
|
||||
stack_get: { minArgs: 1, maxArgs: 1, snippet: "stack_get()", description: "stack_get(slot) - returns the last pushed value in slot without popping it" },
|
||||
stack_has: { minArgs: 1, maxArgs: 1, snippet: "stack_has()", description: "stack_has(slot) - returns 1.0 if slot exists in stack and is not empty else returns 0.0" },
|
||||
stack_pop: { minArgs: 1, maxArgs: 1, snippet: "stack_pop()", description: "stack_pop(slot) - removes and returns the last element of slot stack" },
|
||||
stack_push: { minArgs: 2, maxArgs: 2, snippet: "stack_push()", description: "stack_push(slot, val) - pushes val onto the end of slot stack" },
|
||||
startswith: { minArgs: 2, maxArgs: 2, snippet: "startswith()", description: "startswith(text, prefix) - returns 1 if text starts with prefix, else 0" },
|
||||
std: { minArgs: 1, maxArgs: 1, snippet: "std()", description: "std(x) - computes the standard deviation of elements of x" },
|
||||
step: { minArgs: 2, maxArgs: 2, snippet: "step()", description: "step(x, edge) - returns 0 if x < edge, else 1" },
|
||||
substr: { minArgs: 2, maxArgs: 3, snippet: "substr()", description: "substring(s, start, [end]) - returns a substring of s from start to end. If end is not supplied, it uses end of string" },
|
||||
substring: { minArgs: 2, maxArgs: 3, snippet: "substring()", description: "substring(s, start, [end]) - returns a substring of s from start to end. If end is not supplied, it uses end of string" },
|
||||
sum: { minArgs: 1, maxArgs: 2, snippet: "sum()", description: "sum(x, [dims]) - computes the sum of elements of x, optionally along one or more dimensions" },
|
||||
svd: { minArgs: 1, maxArgs: 2, snippet: "svd()", description: "svd(x, [full_matrices]) - computes the singular value decomposition of x. Returns a list of 3 tensors: U, S, V such that x = matmul(matmul(U, diagonal_matrix(S,shape(U))), V)" },
|
||||
swap: { minArgs: 4, maxArgs: 4, snippet: "swap()", description: "swap(x, dim, idx1, idx2) - swaps elements along dim between idx1 and idx2" },
|
||||
tan: { minArgs: 1, maxArgs: 1, snippet: "tan()", description: "tan(x) - applies tangents function to value or each element of value" },
|
||||
tanh: { minArgs: 1, maxArgs: 1, snippet: "tanh()", description: "tanh(x) - applies hyperbolic tangents function to value or each element of value" },
|
||||
tensor: { minArgs: 2, maxArgs: 3, snippet: "tensor()", description: "tensor(shape, [value], [dtype_template]) - creates a tensor with specified shape and optional value/type. Default value is 0 and default format FP32" },
|
||||
text_image: { minArgs: 3, maxArgs: 9, snippet: "text_image()", description: "text_image(text, font, size, [max_width], [weight], [rotation_angle], [line_spacing], [italic], [underline]) - renders text to an 2D tensor" },
|
||||
timestamp: { minArgs: 0, maxArgs: 0, snippet: "timestamp()", description: "timestamp() - returns the current system timestamp" },
|
||||
tmax: { minArgs: 2, maxArgs: 2, snippet: "tmax()", description: "tmax(x,y) - elementwise maximum of tensor or list. max(x,y) when inputs are floats" },
|
||||
tmin: { minArgs: 2, maxArgs: 2, snippet: "tmin()", description: "tmin(x, y) - elementwise minimum of tensor or list. min(x,y) when inputs are floats" },
|
||||
tnorm: { minArgs: 1, maxArgs: 1, snippet: "tnorm()", description: "tnorm(x) - normalises tensor or list by multiplication such that sum(x^2)==1.0 for each slice. The slice is last dimension of the tensor." },
|
||||
topk: { minArgs: 2, maxArgs: 2, snippet: "topk()", description: "topk(x, k) - returns the k largest elements of x. For tensors it keeps them in place." },
|
||||
topk_ind: { minArgs: 2, maxArgs: 2, snippet: "topk_ind()", description: "topk_indices(x, k) - returns the indices of the k largest elements of x" },
|
||||
topk_indices: { minArgs: 2, maxArgs: 2, snippet: "topk_indices()", description: "topk_indices(x, k) - returns the indices of the k largest elements of x" },
|
||||
trim: { minArgs: 1, maxArgs: 1, snippet: "trim()", description: "trim(x) - removes leading and trailing whitespace from string" },
|
||||
turbulence: { minArgs: 2, maxArgs: 5, snippet: "turbulence()", description: "plasma_noise(seed, scale, [octaves], [offset], [shape]) - generates Plasma/Turbulence noise - same as perlin but default octaves 4" },
|
||||
unique: { minArgs: 1, maxArgs: 1, snippet: "unique()", description: "unique(x) - returns the unique elements (sorted, flatened)" },
|
||||
unsqueeze: { minArgs: 2, maxArgs: 2, snippet: "unsqueeze()", description: "unsqueeze(x, dim) - inserts a size-1 dimension into tensor x at dim" },
|
||||
upper: { minArgs: 1, maxArgs: 1, snippet: "upper()", description: "upper(x) - converts string to uppercase" },
|
||||
var: { minArgs: 1, maxArgs: 1, snippet: "var()", description: "var(x) - computes the variance of elements of x" },
|
||||
voronoi: { minArgs: 2, maxArgs: 5, snippet: "voronoi()", description: "cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise" },
|
||||
voronoi_noise: { minArgs: 2, maxArgs: 5, snippet: "voronoi_noise()", description: "cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise" },
|
||||
where: { minArgs: 3, maxArgs: 3, snippet: "where()", description: "where(condition, x, y) - returns x if condition is true, else y. Runs per element." },
|
||||
worley: { minArgs: 2, maxArgs: 5, snippet: "worley()", description: "cellular_noise(seed, scale, [jitter], [offset], [shape]) - generates Cellular/Voronoi noise" },
|
||||
};
|
||||
|
||||
FUNCTIONS.add("keys");
|
||||
FUNCTION_META.keys = { minArgs: 1, maxArgs: 1, snippet: "keys()", description: "keys(x) - returns dictionary keys in insertion order" };
|
||||
System.Collections.Hashtable: { minArgs: , maxArgs: null, snippet: "", description: "" },
|
||||
};
|
||||
Reference in New Issue
Block a user