AI: more functions
This commit is contained in:
@@ -106,6 +106,13 @@ You can also get the node from comfy manager under the name of More math.
|
||||
- `ln(x)`: natural logarithm.
|
||||
- `log(x)`: base-10 logarithm.
|
||||
- `exp(x)`: exponential `e^x`.
|
||||
- `log1p(x)`: numerically stable `ln(1 + x)`.
|
||||
- `expm1(x)`: numerically stable `exp(x) - 1`.
|
||||
- `isnan(x)`: per-element NaN test.
|
||||
- `isinf(x)`: per-element infinity test.
|
||||
- `isfinite(x)`: per-element finite-value test.
|
||||
- `isclose(a, b, [rtol], [atol])`: elementwise approximate comparison.
|
||||
- `allclose(a, b, [rtol], [atol])`: returns `1.0` when all values are approximately equal, otherwise `0.0`.
|
||||
- `pow(x, y)`: power `x^y`.
|
||||
- `floor(x)`: round down.
|
||||
- `ceil(x)`: round up.
|
||||
@@ -171,9 +178,10 @@ You can also get the node from comfy manager under the name of More math.
|
||||
|
||||
#### 2.2 Reductions & Statistical Aggregates
|
||||
- `sum(x, [dims])`: sum; optional `dims` can be a single dimension or a list of dimensions.
|
||||
- `mean(x)`: mean.
|
||||
- `std(x)`: standard deviation.
|
||||
- `var(x)`: variance.
|
||||
- `mean(x, [dims])`: mean globally or along dimensions.
|
||||
- `std(x, [dims])`: sample standard deviation globally or along dimensions.
|
||||
- `var(x, [dims])`: sample variance globally or along dimensions.
|
||||
- `prod(x, [dims])`: product globally or along dimensions.
|
||||
- `median(x)`: median.
|
||||
- `mode(x)`: mode.
|
||||
- `quartile(x, k)` / `quartil`: quartile (`k` in `0..4`).
|
||||
@@ -203,6 +211,7 @@ You can also get the node from comfy manager under the name of More math.
|
||||
- `gather(tensor, dim, indices)`: gather values along `dim` using `indices`
|
||||
- `scatter(tensor, dim, indices)`: scatter values along `dim` using `indices`
|
||||
- `scatter_add(tensor, dim, indices)`: scatter-add values along `dim` using `indices`
|
||||
- `nonzero(x)`: returns coordinate indices for non-zero elements.
|
||||
|
||||
#### 2.4 Shape / Structure / Layout
|
||||
- `shape(x)`: returns shape as a Python list.
|
||||
@@ -210,6 +219,7 @@ You can also get the node from comfy manager under the name of More math.
|
||||
- `reshape(tensor, shape)` / `rshp`: reshape with element-count validation.
|
||||
- `squeeze(x, [dim])`: removes singleton dimensions; optional `dim` follows PyTorch semantics.
|
||||
- `unsqueeze(x, dim)`: inserts a singleton dimension at `dim`.
|
||||
- `transpose(x, dim0, dim1)` / `swapaxes`: swaps two dimensions.
|
||||
- `permute(tensor, dims)` / `perm`: reorder dimensions.
|
||||
- `crop(tensor, position, size)`: extract a region from tensor or string.
|
||||
- `pad(tensor, padding)`: pad tensor.
|
||||
@@ -218,6 +228,7 @@ You can also get the node from comfy manager under the name of More math.
|
||||
- `repeat(x, count, [dims])`: repeat values; tensor `count` can be a scalar or a per-dimension list when `dims` is provided.
|
||||
- `batch_shuffle(tensor, indices)` / `shuffle` / `select`: reorder along batch dimension.
|
||||
- `concatenate(..., dim)` / `concat` / `cat`: concatenate tensors or lists.
|
||||
- `stack(tensors, [dim])`: stack a non-empty list of tensors along a new dimension.
|
||||
- `roll(tensor, shifts, [dim])`: circular shift.
|
||||
- `tensor(shape, [value, [type]])`: create a filled tensor; `type` a tensor to copy its dtype to self when being created.
|
||||
- `interpolate_linear(tensor, scale)`: linear interpolation-based resizing. Scale can be a single float or a list. When it is a list, it is interpreted as the target output size.
|
||||
|
||||
@@ -204,11 +204,31 @@ func1:
|
||||
/**
|
||||
exp(x) - applies e^x to value (per element)
|
||||
*/
|
||||
| EXP LPAREN expr RPAREN # ExpFunc
|
||||
| EXP LPAREN expr RPAREN # ExpFunc
|
||||
/**
|
||||
log1p(x) - applies ln(1+x) accurately for values near zero
|
||||
*/
|
||||
| LOG1P LPAREN expr RPAREN # Log1pFunc
|
||||
/**
|
||||
expm1(x) - applies exp(x)-1 accurately for values near zero
|
||||
*/
|
||||
| EXPM1 LPAREN expr RPAREN # Expm1Func
|
||||
/**
|
||||
isnan(x) - returns 1.0 for NaN values and 0.0 otherwise
|
||||
*/
|
||||
| ISNAN LPAREN expr RPAREN # IsnanFunc
|
||||
/**
|
||||
isinf(x) - returns 1.0 for infinite values and 0.0 otherwise
|
||||
*/
|
||||
| ISINF LPAREN expr RPAREN # IsinfFunc
|
||||
/**
|
||||
isfinite(x) - returns 1.0 for finite values and 0.0 otherwise
|
||||
*/
|
||||
| ISFINITE LPAREN expr RPAREN # IsfiniteFunc
|
||||
/**
|
||||
tnorm(x, [dim]) - normalises tensor or list by multiplication such that sum(x^2)==1.0 for each slice. Defaults to the last dimension; dim selects a different slicing dimension.
|
||||
*/
|
||||
| TNORM LPAREN expr (COMMA expr)? RPAREN # TNormFunc
|
||||
| TNORM LPAREN expr (COMMA expr)? RPAREN # TNormFunc
|
||||
/**
|
||||
floor(x) - returns the largest integer less than or equal to x
|
||||
*/
|
||||
@@ -270,17 +290,21 @@ func1:
|
||||
*/
|
||||
| SUM LPAREN expr (COMMA expr)? RPAREN # SumFunc
|
||||
/**
|
||||
mean(x) - computes the arithmetic mean of elements of x
|
||||
mean(x, [dims]) - computes the arithmetic mean of elements of x globally or along one or more dimensions
|
||||
*/
|
||||
| MEAN LPAREN expr RPAREN # MeanFunc
|
||||
| MEAN LPAREN expr (COMMA expr)? RPAREN # MeanFunc
|
||||
/**
|
||||
std(x) - computes the standard deviation of elements of x
|
||||
std(x, [dims]) - computes the sample standard deviation of elements of x globally or along one or more dimensions
|
||||
*/
|
||||
| STD LPAREN expr RPAREN # StdFunc
|
||||
| STD LPAREN expr (COMMA expr)? RPAREN # StdFunc
|
||||
/**
|
||||
var(x) - computes the variance of elements of x
|
||||
var(x, [dims]) - computes the sample variance of elements of x globally or along one or more dimensions
|
||||
*/
|
||||
| VAR LPAREN expr RPAREN # VarFunc
|
||||
| VAR LPAREN expr (COMMA expr)? RPAREN # VarFunc
|
||||
/**
|
||||
prod(x, [dims]) - computes the product of elements of x globally or along one or more dimensions
|
||||
*/
|
||||
| PROD LPAREN expr (COMMA expr)? RPAREN # ProdFunc
|
||||
/**
|
||||
sort(x, [desc], [dim]) - returns a sorted version of x (If input is tensor, it sorts the last dimension)
|
||||
*/
|
||||
@@ -479,6 +503,14 @@ func2:
|
||||
atan2(y, x) - computes the arc tangent of y/x, using the signs of both arguments to determine the quadrant
|
||||
*/
|
||||
| ATAN2 LPAREN expr COMMA expr RPAREN # Atan2Func
|
||||
/**
|
||||
isclose(a, b, [rtol], [atol]) - elementwise approximate equality test
|
||||
*/
|
||||
| ISCLOSE LPAREN expr COMMA expr (COMMA expr (COMMA expr)?)? RPAREN # IscloseFunc
|
||||
/**
|
||||
allclose(a, b, [rtol], [atol]) - returns 1.0 if all elements are approximately equal, else 0.0
|
||||
*/
|
||||
| ALLCLOSE LPAREN expr COMMA expr (COMMA expr (COMMA expr)?)? RPAREN # AllcloseFunc
|
||||
/**
|
||||
tmin(x, y) - elementwise minimum of tensor or list. min(x,y) when inputs are floats
|
||||
*/
|
||||
@@ -967,6 +999,11 @@ SQRT: 'sqrt';
|
||||
LN: 'ln';
|
||||
LOG: 'log';
|
||||
EXP: 'exp';
|
||||
LOG1P: 'log1p';
|
||||
EXPM1: 'expm1';
|
||||
ISNAN: 'isnan';
|
||||
ISINF: 'isinf';
|
||||
ISFINITE: 'isfinite';
|
||||
SMIN: 'smin';
|
||||
SMAX: 'smax';
|
||||
TMIN: 'tmin';
|
||||
@@ -1011,6 +1048,9 @@ SUM: 'sum';
|
||||
MEAN: 'mean';
|
||||
STD: 'std';
|
||||
VAR: 'var';
|
||||
PROD: 'prod';
|
||||
ISCLOSE: 'isclose';
|
||||
ALLCLOSE: 'allclose';
|
||||
QUARTILE: 'quartile' | 'quartil';
|
||||
PERCENTILE: 'percentile' | 'prcnt';
|
||||
QUANTILE: 'quantile';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -403,6 +403,32 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
return list_op(val)
|
||||
return val
|
||||
|
||||
def _normalize_dims(self, dims, ndim, ctx, context_name="dimension"):
|
||||
if self._is_tensor(dims):
|
||||
if dims.numel() == 0:
|
||||
raise ValueError(f"{ctx.start.line}:{ctx.start.column}: {context_name} list cannot be empty")
|
||||
raw_dims = [int(x) for x in dims.flatten().tolist()]
|
||||
elif self._is_list(dims):
|
||||
if len(dims) == 0:
|
||||
raise ValueError(f"{ctx.start.line}:{ctx.start.column}: {context_name} list cannot be empty")
|
||||
raw_dims = [self._to_int(x, ctx, context_name, strict=True) for x in dims]
|
||||
else:
|
||||
raw_dims = [self._to_int(dims, ctx, context_name, strict=True)]
|
||||
|
||||
normalized = []
|
||||
seen = set()
|
||||
for dim in raw_dims:
|
||||
if dim < 0:
|
||||
dim += ndim
|
||||
if dim < 0 or dim >= ndim:
|
||||
raise ValueError(f"{ctx.start.line}:{ctx.start.column}: {context_name} {dim} out of range for tensor with {ndim} dimensions")
|
||||
if dim in seen:
|
||||
raise ValueError(f"{ctx.start.line}:{ctx.start.column}: {context_name} list contains duplicate dimension {dim}")
|
||||
seen.add(dim)
|
||||
normalized.append(dim)
|
||||
|
||||
return sorted(normalized, reverse=True)
|
||||
|
||||
def _to_int(self, x, ctx, context_name="operation", strict=False):
|
||||
"""Convert value to int, handling tensors and nested lists recursively"""
|
||||
if self._is_tensor(x):
|
||||
@@ -505,17 +531,14 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
return result
|
||||
|
||||
def _reduce_tensor_along_dims(self, tensor, dims, reducer, ctx, context_name="operation"):
|
||||
if not self._is_tensor(tensor):
|
||||
return tensor
|
||||
dim_list = self._normalize_dim_list(dims, ctx, context_name)
|
||||
if not dim_list:
|
||||
return reducer(tensor)
|
||||
|
||||
normalized_dims = []
|
||||
for dim in dim_list:
|
||||
norm_dim = dim if dim >= 0 else tensor.ndim + dim
|
||||
normalized_dims.append(norm_dim)
|
||||
|
||||
result = tensor
|
||||
for dim in sorted(set(normalized_dims), reverse=True):
|
||||
for dim in self._normalize_dims(dim_list, tensor.ndim, ctx, context_name):
|
||||
result = reducer(result, dim)
|
||||
# torch.min/max(..., dim=...) return a torch.return_types
|
||||
# named tuple with a .values field; unwrap it. A plain
|
||||
@@ -1016,6 +1039,21 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
def visitExpFunc(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), torch.exp, math.exp)
|
||||
|
||||
def visitLog1pFunc(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), torch.log1p, math.log1p)
|
||||
|
||||
def visitExpm1Func(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), torch.expm1, math.expm1)
|
||||
|
||||
def visitIsnanFunc(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), lambda x: torch.isnan(x).to(torch.float32), lambda x: 1.0 if math.isnan(float(x)) else 0.0)
|
||||
|
||||
def visitIsinfFunc(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), lambda x: torch.isinf(x).to(torch.float32), lambda x: 1.0 if math.isinf(float(x)) else 0.0)
|
||||
|
||||
def visitIsfiniteFunc(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), lambda x: torch.isfinite(x).to(torch.float32), lambda x: 1.0 if math.isfinite(float(x)) else 0.0)
|
||||
|
||||
def visitFloorFunc(self, ctx):
|
||||
return self._unary_op((yield ctx.expr()), torch.floor, math.floor)
|
||||
|
||||
@@ -1089,6 +1127,60 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
def visitAtan2Func(self, ctx):
|
||||
return self._bin_op((yield ctx.expr(0)), (yield ctx.expr(1)), torch.atan2, math.atan2,ctx)
|
||||
|
||||
def visitIscloseFunc(self, ctx):
|
||||
a = yield ctx.expr(0)
|
||||
b = yield ctx.expr(1)
|
||||
rtol = 1e-05
|
||||
atol = 1e-08
|
||||
if len(ctx.expr()) > 2:
|
||||
rtol_val = yield ctx.expr(2)
|
||||
rtol = float(rtol_val.item() if self._is_tensor(rtol_val) else rtol_val)
|
||||
if len(ctx.expr()) > 3:
|
||||
atol_val = yield ctx.expr(3)
|
||||
atol = float(atol_val.item() if self._is_tensor(atol_val) else atol_val)
|
||||
|
||||
def compare(left, right):
|
||||
if self._is_list(left) and self._is_list(right):
|
||||
if len(left) != len(right):
|
||||
raise ValueError(f"{ctx.start.line}:{ctx.start.column}: isclose list length mismatch")
|
||||
return [compare(l, r) for l, r in zip(left, right)]
|
||||
if self._is_list(left):
|
||||
return [compare(l, right) for l in left]
|
||||
if self._is_list(right):
|
||||
return [compare(left, r) for r in right]
|
||||
if self._is_tensor(left) or self._is_tensor(right):
|
||||
return torch.isclose(self._promote_to_tensor(left), self._promote_to_tensor(right), rtol=rtol, atol=atol).to(torch.float32)
|
||||
return 1.0 if math.isclose(float(left), float(right), rel_tol=rtol, abs_tol=atol) else 0.0
|
||||
|
||||
return compare(a, b)
|
||||
|
||||
def visitAllcloseFunc(self, ctx):
|
||||
a = yield ctx.expr(0)
|
||||
b = yield ctx.expr(1)
|
||||
rtol = 1e-05
|
||||
atol = 1e-08
|
||||
if len(ctx.expr()) > 2:
|
||||
rtol_val = yield ctx.expr(2)
|
||||
rtol = float(rtol_val.item() if self._is_tensor(rtol_val) else rtol_val)
|
||||
if len(ctx.expr()) > 3:
|
||||
atol_val = yield ctx.expr(3)
|
||||
atol = float(atol_val.item() if self._is_tensor(atol_val) else atol_val)
|
||||
|
||||
def compare(left, right):
|
||||
if self._is_list(left) and self._is_list(right):
|
||||
if len(left) != len(right):
|
||||
raise ValueError(f"{ctx.start.line}:{ctx.start.column}: allclose list length mismatch")
|
||||
return all(compare(l, r) for l, r in zip(left, right))
|
||||
if self._is_list(left):
|
||||
return all(compare(l, right) for l in left)
|
||||
if self._is_list(right):
|
||||
return all(compare(left, r) for r in right)
|
||||
if self._is_tensor(left) or self._is_tensor(right):
|
||||
return bool(torch.allclose(self._promote_to_tensor(left), self._promote_to_tensor(right), rtol=rtol, atol=atol))
|
||||
return math.isclose(float(left), float(right), rel_tol=rtol, abs_tol=atol)
|
||||
|
||||
return 1.0 if compare(a, b) else 0.0
|
||||
|
||||
def visitTMinFunc(self, ctx):
|
||||
return self._bin_op((yield ctx.expr(0)), (yield ctx.expr(1)), torch.minimum, min,ctx)
|
||||
|
||||
@@ -1467,24 +1559,6 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
return res.item()
|
||||
return res
|
||||
|
||||
def visitAnyFunc(self, ctx):
|
||||
val = (yield ctx.expr())
|
||||
if self._is_tensor(val):
|
||||
return 1.0 if bool(torch.any(val).item()) else 0.0
|
||||
if self._is_list(val):
|
||||
flat = self._flatten_list(val)
|
||||
return 1.0 if any(item != 0 for item in flat) else 0.0
|
||||
return 1.0 if val else 0.0
|
||||
|
||||
def visitAllFunc(self, ctx):
|
||||
val = (yield ctx.expr())
|
||||
if self._is_tensor(val):
|
||||
return 1.0 if bool(torch.all(val).item()) else 0.0
|
||||
if self._is_list(val):
|
||||
flat = self._flatten_list(val)
|
||||
return 1.0 if all(item != 0 for item in flat) else 0.0
|
||||
return 1.0 if val else 0.0
|
||||
|
||||
def visitSMaxFunc(self, ctx):
|
||||
args = []
|
||||
for e in ctx.expr():
|
||||
@@ -1787,9 +1861,87 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
dims = (yield ctx.expr(1))
|
||||
if self._is_tensor(val) or self._is_list(val):
|
||||
tsr = self._promote_to_tensor(val)
|
||||
return self._reduce_tensor_along_dims(tsr, dims, lambda t, dim: torch.sum(t, dim=dim), ctx, "sum")
|
||||
res = self._reduce_tensor_along_dims(tsr, dims, lambda t, dim: torch.sum(t, dim=dim), ctx, "sum")
|
||||
return res.item() if self._is_tensor(res) and res.numel() == 1 else res
|
||||
return self._reduction_op(val, torch.sum, sum)
|
||||
|
||||
def visitProdFunc(self, ctx):
|
||||
val = (yield ctx.expr(0))
|
||||
if len(ctx.expr()) > 1:
|
||||
dims = (yield ctx.expr(1))
|
||||
if self._is_tensor(val) or self._is_list(val):
|
||||
tsr = self._promote_to_tensor(val)
|
||||
res = self._reduce_tensor_along_dims(tsr, dims, lambda t, dim: torch.prod(t, dim=dim), ctx, "prod")
|
||||
return res.item() if self._is_tensor(res) and res.numel() == 1 else res
|
||||
if self._is_tensor(val):
|
||||
res = torch.prod(val)
|
||||
return float(res.item()) if res.numel() == 1 else res
|
||||
if self._is_list(val):
|
||||
return math.prod(val)
|
||||
return val
|
||||
|
||||
def visitMeanFunc(self, ctx):
|
||||
val = (yield ctx.expr(0))
|
||||
if len(ctx.expr()) > 1:
|
||||
dims = (yield ctx.expr(1))
|
||||
if self._is_tensor(val) or self._is_list(val):
|
||||
tsr = self._promote_to_tensor(val)
|
||||
normalized_dims = self._normalize_dims(dims, tsr.ndim, ctx, "mean dimension")
|
||||
res = torch.mean(tsr.float(), dim=tuple(normalized_dims))
|
||||
return res.item() if self._is_tensor(res) and res.numel() == 1 else res
|
||||
return self._reduction_op(val, lambda x: torch.mean(x.float()), lambda x: sum(x) / len(x) if x else 0.0)
|
||||
|
||||
def visitStdFunc(self, ctx):
|
||||
def list_std(val):
|
||||
if len(val) < 2:
|
||||
return 0.0
|
||||
mean = sum(val) / len(val)
|
||||
variance = sum((x - mean) ** 2 for x in val) / (len(val) - 1)
|
||||
return math.sqrt(variance)
|
||||
|
||||
val = (yield ctx.expr(0))
|
||||
if len(ctx.expr()) > 1:
|
||||
dims = (yield ctx.expr(1))
|
||||
if self._is_tensor(val) or self._is_list(val):
|
||||
tsr = self._promote_to_tensor(val)
|
||||
normalized_dims = self._normalize_dims(dims, tsr.ndim, ctx, "std dimension")
|
||||
res = torch.std(tsr.float(), dim=tuple(normalized_dims))
|
||||
return res.item() if self._is_tensor(res) and res.numel() == 1 else res
|
||||
if self._is_tensor(val):
|
||||
res = torch.std(val.float())
|
||||
if self._is_tensor(res) and res.numel() == 1:
|
||||
return float(res.item())
|
||||
return res
|
||||
elif self._is_list(val):
|
||||
return list_std(val)
|
||||
else:
|
||||
return val
|
||||
|
||||
def visitVarFunc(self, ctx):
|
||||
def list_var(val):
|
||||
if len(val) < 2:
|
||||
return 0.0
|
||||
mean = sum(val) / len(val)
|
||||
return sum((x - mean) ** 2 for x in val) / (len(val) - 1)
|
||||
|
||||
val = (yield ctx.expr(0))
|
||||
if len(ctx.expr()) > 1:
|
||||
dims = (yield ctx.expr(1))
|
||||
if self._is_tensor(val) or self._is_list(val):
|
||||
tsr = self._promote_to_tensor(val)
|
||||
normalized_dims = self._normalize_dims(dims, tsr.ndim, ctx, "var dimension")
|
||||
res = torch.var(tsr.float(), dim=tuple(normalized_dims))
|
||||
return res.item() if self._is_tensor(res) and res.numel() == 1 else res
|
||||
if self._is_tensor(val):
|
||||
res = torch.var(val.float())
|
||||
if self._is_tensor(res) and res.numel() == 1:
|
||||
return float(res.item())
|
||||
return res
|
||||
elif self._is_list(val):
|
||||
return list_var(val)
|
||||
else:
|
||||
return val
|
||||
|
||||
def visitCountFunc(self, ctx):
|
||||
val = yield ctx.expr()
|
||||
if isinstance(val, dict):
|
||||
@@ -1848,48 +2000,6 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
val.reset_tracking()
|
||||
return val
|
||||
|
||||
def visitMeanFunc(self, ctx):
|
||||
return self._reduction_op(
|
||||
(yield ctx.expr()), lambda x: torch.mean(x.float()), lambda x: sum(x) / len(x) if x else 0.0
|
||||
)
|
||||
|
||||
def visitStdFunc(self, ctx):
|
||||
def list_std(val):
|
||||
if len(val) < 2:
|
||||
return 0.0
|
||||
mean = sum(val) / len(val)
|
||||
variance = sum((x - mean) ** 2 for x in val) / (len(val) - 1)
|
||||
return math.sqrt(variance)
|
||||
|
||||
val = (yield ctx.expr())
|
||||
if self._is_tensor(val):
|
||||
res = torch.std(val.float())
|
||||
if self._is_tensor(res) and res.numel() == 1:
|
||||
return float(res.item())
|
||||
return res
|
||||
elif self._is_list(val):
|
||||
return list_std(val)
|
||||
else:
|
||||
return val
|
||||
|
||||
def visitVarFunc(self, ctx):
|
||||
def list_var(val):
|
||||
if len(val) < 2:
|
||||
return 0.0
|
||||
mean = sum(val) / len(val)
|
||||
return sum((x - mean) ** 2 for x in val) / (len(val) - 1)
|
||||
|
||||
val = (yield ctx.expr())
|
||||
if self._is_tensor(val):
|
||||
res = torch.var(val.float())
|
||||
if self._is_tensor(res) and res.numel() == 1:
|
||||
return float(res.item())
|
||||
return res
|
||||
elif self._is_list(val):
|
||||
return list_var(val)
|
||||
else:
|
||||
return val
|
||||
|
||||
def _manual_quantile(self, val, q):
|
||||
"""Fallback implementation using sort for when torch.quantile fails on large tensors."""
|
||||
val_flat = val.flatten().float()
|
||||
@@ -2688,6 +2798,10 @@ class UnifiedMathVisitor(MathExprVisitor):
|
||||
def visitCallExp(self, ctx):
|
||||
func_name = ctx.VARIABLE().getText()
|
||||
|
||||
builtin_visit = f"visit{func_name[:1].upper()}{func_name[1:]}Func"
|
||||
if hasattr(self, builtin_visit):
|
||||
return (yield getattr(self, builtin_visit)(ctx))
|
||||
|
||||
# 1) Pokud proměnná existuje a je to lambda uložená v variables, aplikuj ji
|
||||
if func_name in self.variables and isinstance(self.variables[func_name], LambdaFunction):
|
||||
lam = self.variables[func_name]
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16,235 +16,243 @@ SQRT=15
|
||||
LN=16
|
||||
LOG=17
|
||||
EXP=18
|
||||
SMIN=19
|
||||
SMAX=20
|
||||
TMIN=21
|
||||
TMAX=22
|
||||
TNORM=23
|
||||
SNORM=24
|
||||
FLOOR=25
|
||||
CEIL=26
|
||||
ROUND=27
|
||||
GAMMA=28
|
||||
POWE=29
|
||||
SIGM=30
|
||||
CLAMP=31
|
||||
SFFT=32
|
||||
SIFFT=33
|
||||
ANGL=34
|
||||
PRNT=35
|
||||
PRINT_SHAPE=36
|
||||
NVL=37
|
||||
LERP=38
|
||||
STEP=39
|
||||
SMOOTHSTEP=40
|
||||
FRACT=41
|
||||
RELU=42
|
||||
SOFTPLUS=43
|
||||
GELU=44
|
||||
SIGN=45
|
||||
MAP=46
|
||||
EZCONV=47
|
||||
CONV=48
|
||||
SWAP=49
|
||||
TRANSPOSE=50
|
||||
PERM=51
|
||||
RESHAPE=52
|
||||
RANGE=53
|
||||
LINSPACE=54
|
||||
LOGSPACE=55
|
||||
TOPK=56
|
||||
BOTK=57
|
||||
PINV=58
|
||||
SUM=59
|
||||
MEAN=60
|
||||
STD=61
|
||||
VAR=62
|
||||
QUARTILE=63
|
||||
PERCENTILE=64
|
||||
QUANTILE=65
|
||||
DOT=66
|
||||
MOMENT=67
|
||||
ERF=68
|
||||
ERFINV=69
|
||||
ANY=70
|
||||
ALL=71
|
||||
EDGE=72
|
||||
GAUSSIAN=73
|
||||
MEDIAN=74
|
||||
MODE=75
|
||||
CUMSUM=76
|
||||
CUMPROD=77
|
||||
TOPK_IND=78
|
||||
BOTK_IND=79
|
||||
CUBIC_EASE=80
|
||||
ELASTIC_EASE=81
|
||||
SINE_EASE=82
|
||||
SMOOTHERSTEP=83
|
||||
DIST=84
|
||||
REMAP=85
|
||||
COSSIM=86
|
||||
COUNT=87
|
||||
KEYS=88
|
||||
ENABLE_TRACKING=89
|
||||
DISABLE_TRACKING=90
|
||||
RESET_TRACKING=91
|
||||
GET_CHANGED_KEYS=92
|
||||
GET_ADDED_KEYS=93
|
||||
GET_REMOVED_KEYS=94
|
||||
GET_UNCHANGED_KEYS=95
|
||||
REPEAT=96
|
||||
FLATTEN=97
|
||||
APPEND=98
|
||||
GET_VALUE=99
|
||||
FLOW_APPLY=100
|
||||
BATCH_SHUFFLE=101
|
||||
MOTION_MASK=102
|
||||
FLOW_TO_IMAGE=103
|
||||
FLOW_MAG=104
|
||||
FLOW_ANG=105
|
||||
WHERE=106
|
||||
HISTOGRAM=107
|
||||
OVERLAY=108
|
||||
PAD=109
|
||||
CROSS=110
|
||||
MATMUL=111
|
||||
RIFE=112
|
||||
BNOT=113
|
||||
BITCOUNT=114
|
||||
SHAPE=115
|
||||
BAND=116
|
||||
XOR=117
|
||||
BOR=118
|
||||
TENSOR=119
|
||||
ADD_KEY=120
|
||||
REMOVE_KEY=121
|
||||
PUSH=122
|
||||
POP=123
|
||||
CLEAR=124
|
||||
HAS=125
|
||||
GET=126
|
||||
CONCAT=127
|
||||
STACK=128
|
||||
NONZERO=129
|
||||
INT=130
|
||||
FLOAT=131
|
||||
UPPER=132
|
||||
LOWER=133
|
||||
TRIM=134
|
||||
SPLIT=135
|
||||
JOIN=136
|
||||
SUBSTRING=137
|
||||
FIND=138
|
||||
REPLACE=139
|
||||
DILATE=140
|
||||
ERODE=141
|
||||
MORPH_OPEN=142
|
||||
MORPH_CLOSE=143
|
||||
RGB_TO_OKLAB=144
|
||||
RGB_TO_CIELAB=145
|
||||
OKLAB_TO_RGB=146
|
||||
CIELAB_TO_RGB=147
|
||||
RGB_TO_HSV=148
|
||||
HSV_TO_RGB=149
|
||||
INT_TO_RGB=150
|
||||
RGB_TO_INT=151
|
||||
INTERPOLATE_LINEAR=152
|
||||
INTERPOLATE_AREA=153
|
||||
INTERPOLATE_NEAREST=154
|
||||
TEXT_IMAGE=155
|
||||
AS_NESTED=156
|
||||
SVD=157
|
||||
DIAG=158
|
||||
IF=159
|
||||
ELSE=160
|
||||
WHILE=161
|
||||
FOR=162
|
||||
IN=163
|
||||
BREAK=164
|
||||
CONTINUE=165
|
||||
RETURN=166
|
||||
TIMESTAMP=167
|
||||
SORT=168
|
||||
ARGSORT=169
|
||||
ARGMIN=170
|
||||
ARGMAX=171
|
||||
SOFTMAX=172
|
||||
SOFTMIN=173
|
||||
UNIQUE=174
|
||||
FLIP=175
|
||||
STARTSWITH=176
|
||||
ENDSWITH=177
|
||||
SQUEEZE=178
|
||||
UNSQUEEZE=179
|
||||
ROLL=180
|
||||
COV=181
|
||||
CORR=182
|
||||
ENTROPY=183
|
||||
CROP=184
|
||||
NONE=185
|
||||
COORDS=186
|
||||
GATHER=187
|
||||
SCATTER=188
|
||||
SCATTER_ADD=189
|
||||
NOISE=190
|
||||
RAND=191
|
||||
CAUCHY=192
|
||||
EXPONENTIAL=193
|
||||
LOGNORMAL=194
|
||||
BERNOULLI=195
|
||||
POISSON=196
|
||||
GAMMADIST=197
|
||||
BETADIST=198
|
||||
LAPLACEDIST=199
|
||||
GUMBELDIST=200
|
||||
WEIBULLDIST=201
|
||||
CHI2DIST=202
|
||||
STUDENTTDIST=203
|
||||
PERLIN=204
|
||||
CELLULAR=205
|
||||
PLASMA=206
|
||||
RIDGED=207
|
||||
DOMAIN_WARP=208
|
||||
PLUS=209
|
||||
MINUS=210
|
||||
MULT=211
|
||||
DIV=212
|
||||
MOD=213
|
||||
POW=214
|
||||
LSHIFT=215
|
||||
RSHIFT=216
|
||||
GE=217
|
||||
GT=218
|
||||
LE=219
|
||||
LT=220
|
||||
EQ=221
|
||||
EQUEALS=222
|
||||
PLUS_EQ=223
|
||||
MINUS_EQ=224
|
||||
MULT_EQ=225
|
||||
DIV_EQ=226
|
||||
MOD_EQ=227
|
||||
NE=228
|
||||
PIPE=229
|
||||
LPAREN=230
|
||||
RPAREN=231
|
||||
COMMA=232
|
||||
SEMICOLON=233
|
||||
ARROW=234
|
||||
LBRACKET=235
|
||||
RBRACKET=236
|
||||
QUESTION=237
|
||||
COLON=238
|
||||
LBRACE=239
|
||||
RBRACE=240
|
||||
NUMBER=241
|
||||
CONSTANT=242
|
||||
STRING=243
|
||||
VARIABLE=244
|
||||
SL_COMMENT=245
|
||||
ML_COMMENT=246
|
||||
WS=247
|
||||
LOG1P=19
|
||||
EXPM1=20
|
||||
ISNAN=21
|
||||
ISINF=22
|
||||
ISFINITE=23
|
||||
SMIN=24
|
||||
SMAX=25
|
||||
TMIN=26
|
||||
TMAX=27
|
||||
TNORM=28
|
||||
SNORM=29
|
||||
FLOOR=30
|
||||
CEIL=31
|
||||
ROUND=32
|
||||
GAMMA=33
|
||||
POWE=34
|
||||
SIGM=35
|
||||
CLAMP=36
|
||||
SFFT=37
|
||||
SIFFT=38
|
||||
ANGL=39
|
||||
PRNT=40
|
||||
PRINT_SHAPE=41
|
||||
NVL=42
|
||||
LERP=43
|
||||
STEP=44
|
||||
SMOOTHSTEP=45
|
||||
FRACT=46
|
||||
RELU=47
|
||||
SOFTPLUS=48
|
||||
GELU=49
|
||||
SIGN=50
|
||||
MAP=51
|
||||
EZCONV=52
|
||||
CONV=53
|
||||
SWAP=54
|
||||
TRANSPOSE=55
|
||||
PERM=56
|
||||
RESHAPE=57
|
||||
RANGE=58
|
||||
LINSPACE=59
|
||||
LOGSPACE=60
|
||||
TOPK=61
|
||||
BOTK=62
|
||||
PINV=63
|
||||
SUM=64
|
||||
MEAN=65
|
||||
STD=66
|
||||
VAR=67
|
||||
PROD=68
|
||||
ISCLOSE=69
|
||||
ALLCLOSE=70
|
||||
QUARTILE=71
|
||||
PERCENTILE=72
|
||||
QUANTILE=73
|
||||
DOT=74
|
||||
MOMENT=75
|
||||
ERF=76
|
||||
ERFINV=77
|
||||
ANY=78
|
||||
ALL=79
|
||||
EDGE=80
|
||||
GAUSSIAN=81
|
||||
MEDIAN=82
|
||||
MODE=83
|
||||
CUMSUM=84
|
||||
CUMPROD=85
|
||||
TOPK_IND=86
|
||||
BOTK_IND=87
|
||||
CUBIC_EASE=88
|
||||
ELASTIC_EASE=89
|
||||
SINE_EASE=90
|
||||
SMOOTHERSTEP=91
|
||||
DIST=92
|
||||
REMAP=93
|
||||
COSSIM=94
|
||||
COUNT=95
|
||||
KEYS=96
|
||||
ENABLE_TRACKING=97
|
||||
DISABLE_TRACKING=98
|
||||
RESET_TRACKING=99
|
||||
GET_CHANGED_KEYS=100
|
||||
GET_ADDED_KEYS=101
|
||||
GET_REMOVED_KEYS=102
|
||||
GET_UNCHANGED_KEYS=103
|
||||
REPEAT=104
|
||||
FLATTEN=105
|
||||
APPEND=106
|
||||
GET_VALUE=107
|
||||
FLOW_APPLY=108
|
||||
BATCH_SHUFFLE=109
|
||||
MOTION_MASK=110
|
||||
FLOW_TO_IMAGE=111
|
||||
FLOW_MAG=112
|
||||
FLOW_ANG=113
|
||||
WHERE=114
|
||||
HISTOGRAM=115
|
||||
OVERLAY=116
|
||||
PAD=117
|
||||
CROSS=118
|
||||
MATMUL=119
|
||||
RIFE=120
|
||||
BNOT=121
|
||||
BITCOUNT=122
|
||||
SHAPE=123
|
||||
BAND=124
|
||||
XOR=125
|
||||
BOR=126
|
||||
TENSOR=127
|
||||
ADD_KEY=128
|
||||
REMOVE_KEY=129
|
||||
PUSH=130
|
||||
POP=131
|
||||
CLEAR=132
|
||||
HAS=133
|
||||
GET=134
|
||||
CONCAT=135
|
||||
STACK=136
|
||||
NONZERO=137
|
||||
INT=138
|
||||
FLOAT=139
|
||||
UPPER=140
|
||||
LOWER=141
|
||||
TRIM=142
|
||||
SPLIT=143
|
||||
JOIN=144
|
||||
SUBSTRING=145
|
||||
FIND=146
|
||||
REPLACE=147
|
||||
DILATE=148
|
||||
ERODE=149
|
||||
MORPH_OPEN=150
|
||||
MORPH_CLOSE=151
|
||||
RGB_TO_OKLAB=152
|
||||
RGB_TO_CIELAB=153
|
||||
OKLAB_TO_RGB=154
|
||||
CIELAB_TO_RGB=155
|
||||
RGB_TO_HSV=156
|
||||
HSV_TO_RGB=157
|
||||
INT_TO_RGB=158
|
||||
RGB_TO_INT=159
|
||||
INTERPOLATE_LINEAR=160
|
||||
INTERPOLATE_AREA=161
|
||||
INTERPOLATE_NEAREST=162
|
||||
TEXT_IMAGE=163
|
||||
AS_NESTED=164
|
||||
SVD=165
|
||||
DIAG=166
|
||||
IF=167
|
||||
ELSE=168
|
||||
WHILE=169
|
||||
FOR=170
|
||||
IN=171
|
||||
BREAK=172
|
||||
CONTINUE=173
|
||||
RETURN=174
|
||||
TIMESTAMP=175
|
||||
SORT=176
|
||||
ARGSORT=177
|
||||
ARGMIN=178
|
||||
ARGMAX=179
|
||||
SOFTMAX=180
|
||||
SOFTMIN=181
|
||||
UNIQUE=182
|
||||
FLIP=183
|
||||
STARTSWITH=184
|
||||
ENDSWITH=185
|
||||
SQUEEZE=186
|
||||
UNSQUEEZE=187
|
||||
ROLL=188
|
||||
COV=189
|
||||
CORR=190
|
||||
ENTROPY=191
|
||||
CROP=192
|
||||
NONE=193
|
||||
COORDS=194
|
||||
GATHER=195
|
||||
SCATTER=196
|
||||
SCATTER_ADD=197
|
||||
NOISE=198
|
||||
RAND=199
|
||||
CAUCHY=200
|
||||
EXPONENTIAL=201
|
||||
LOGNORMAL=202
|
||||
BERNOULLI=203
|
||||
POISSON=204
|
||||
GAMMADIST=205
|
||||
BETADIST=206
|
||||
LAPLACEDIST=207
|
||||
GUMBELDIST=208
|
||||
WEIBULLDIST=209
|
||||
CHI2DIST=210
|
||||
STUDENTTDIST=211
|
||||
PERLIN=212
|
||||
CELLULAR=213
|
||||
PLASMA=214
|
||||
RIDGED=215
|
||||
DOMAIN_WARP=216
|
||||
PLUS=217
|
||||
MINUS=218
|
||||
MULT=219
|
||||
DIV=220
|
||||
MOD=221
|
||||
POW=222
|
||||
LSHIFT=223
|
||||
RSHIFT=224
|
||||
GE=225
|
||||
GT=226
|
||||
LE=227
|
||||
LT=228
|
||||
EQ=229
|
||||
EQUEALS=230
|
||||
PLUS_EQ=231
|
||||
MINUS_EQ=232
|
||||
MULT_EQ=233
|
||||
DIV_EQ=234
|
||||
MOD_EQ=235
|
||||
NE=236
|
||||
PIPE=237
|
||||
LPAREN=238
|
||||
RPAREN=239
|
||||
COMMA=240
|
||||
SEMICOLON=241
|
||||
ARROW=242
|
||||
LBRACKET=243
|
||||
RBRACKET=244
|
||||
QUESTION=245
|
||||
COLON=246
|
||||
LBRACE=247
|
||||
RBRACE=248
|
||||
NUMBER=249
|
||||
CONSTANT=250
|
||||
STRING=251
|
||||
VARIABLE=252
|
||||
SL_COMMENT=253
|
||||
ML_COMMENT=254
|
||||
WS=255
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -263,161 +271,169 @@ WS=247
|
||||
'ln'=16
|
||||
'log'=17
|
||||
'exp'=18
|
||||
'smin'=19
|
||||
'smax'=20
|
||||
'tmin'=21
|
||||
'tmax'=22
|
||||
'tnorm'=23
|
||||
'snorm'=24
|
||||
'floor'=25
|
||||
'ceil'=26
|
||||
'round'=27
|
||||
'gamma'=28
|
||||
'pow'=29
|
||||
'sigm'=30
|
||||
'clamp'=31
|
||||
'fft'=32
|
||||
'ifft'=33
|
||||
'angle'=34
|
||||
'print'=35
|
||||
'lerp'=38
|
||||
'step'=39
|
||||
'smoothstep'=40
|
||||
'fract'=41
|
||||
'relu'=42
|
||||
'softplus'=43
|
||||
'gelu'=44
|
||||
'sign'=45
|
||||
'map'=46
|
||||
'swap'=49
|
||||
'range'=53
|
||||
'linspace'=54
|
||||
'logspace'=55
|
||||
'topk'=56
|
||||
'botk'=57
|
||||
'pinv'=58
|
||||
'sum'=59
|
||||
'mean'=60
|
||||
'std'=61
|
||||
'var'=62
|
||||
'quantile'=65
|
||||
'dot'=66
|
||||
'moment'=67
|
||||
'erf'=68
|
||||
'erfinv'=69
|
||||
'any'=70
|
||||
'all'=71
|
||||
'edge'=72
|
||||
'median'=74
|
||||
'mode'=75
|
||||
'cumsum'=76
|
||||
'cumprod'=77
|
||||
'smootherstep'=83
|
||||
'remap'=85
|
||||
'keys'=88
|
||||
'repeat'=96
|
||||
'flatten'=97
|
||||
'append'=98
|
||||
'get_value'=99
|
||||
'flow_apply'=100
|
||||
'motion_mask'=102
|
||||
'flow_to_image'=103
|
||||
'where'=106
|
||||
'overlay'=108
|
||||
'pad'=109
|
||||
'cross'=110
|
||||
'matmul'=111
|
||||
'rife'=112
|
||||
'shape'=115
|
||||
'tensor'=119
|
||||
'add_key'=120
|
||||
'stack_push'=122
|
||||
'stack_pop'=123
|
||||
'stack_clear'=124
|
||||
'stack_has'=125
|
||||
'stack_get'=126
|
||||
'stack'=128
|
||||
'nonzero'=129
|
||||
'int'=130
|
||||
'float'=131
|
||||
'upper'=132
|
||||
'lower'=133
|
||||
'trim'=134
|
||||
'split'=135
|
||||
'join'=136
|
||||
'find'=138
|
||||
'replace'=139
|
||||
'dilate'=140
|
||||
'erode'=141
|
||||
'morph_open'=142
|
||||
'morph_close'=143
|
||||
'rgb_to_oklab'=144
|
||||
'rgb_to_cielab'=145
|
||||
'oklab_to_rgb'=146
|
||||
'cielab_to_rgb'=147
|
||||
'rgb_to_hsv'=148
|
||||
'hsv_to_rgb'=149
|
||||
'int_to_rgb'=150
|
||||
'rgb_to_int'=151
|
||||
'interpolate_linear'=152
|
||||
'interpolate_area'=153
|
||||
'text_image'=155
|
||||
'if'=159
|
||||
'else'=160
|
||||
'while'=161
|
||||
'for'=162
|
||||
'in'=163
|
||||
'break'=164
|
||||
'continue'=165
|
||||
'return'=166
|
||||
'sort'=168
|
||||
'argsort'=169
|
||||
'argmin'=170
|
||||
'argmax'=171
|
||||
'softmax'=172
|
||||
'softmin'=173
|
||||
'unique'=174
|
||||
'flip'=175
|
||||
'startswith'=176
|
||||
'endswith'=177
|
||||
'squeeze'=178
|
||||
'unsqueeze'=179
|
||||
'roll'=180
|
||||
'cov'=181
|
||||
'entropy'=183
|
||||
'crop'=184
|
||||
'gather'=187
|
||||
'scatter'=188
|
||||
'scatter_add'=189
|
||||
'+'=209
|
||||
'-'=210
|
||||
'*'=211
|
||||
'/'=212
|
||||
'%'=213
|
||||
'^'=214
|
||||
'<<'=215
|
||||
'>>'=216
|
||||
'>='=217
|
||||
'>'=218
|
||||
'<='=219
|
||||
'<'=220
|
||||
'=='=221
|
||||
'='=222
|
||||
'+='=223
|
||||
'-='=224
|
||||
'*='=225
|
||||
'/='=226
|
||||
'%='=227
|
||||
'!='=228
|
||||
'|'=229
|
||||
'('=230
|
||||
')'=231
|
||||
','=232
|
||||
';'=233
|
||||
'->'=234
|
||||
'['=235
|
||||
']'=236
|
||||
'?'=237
|
||||
':'=238
|
||||
'{'=239
|
||||
'}'=240
|
||||
'log1p'=19
|
||||
'expm1'=20
|
||||
'isnan'=21
|
||||
'isinf'=22
|
||||
'isfinite'=23
|
||||
'smin'=24
|
||||
'smax'=25
|
||||
'tmin'=26
|
||||
'tmax'=27
|
||||
'tnorm'=28
|
||||
'snorm'=29
|
||||
'floor'=30
|
||||
'ceil'=31
|
||||
'round'=32
|
||||
'gamma'=33
|
||||
'pow'=34
|
||||
'sigm'=35
|
||||
'clamp'=36
|
||||
'fft'=37
|
||||
'ifft'=38
|
||||
'angle'=39
|
||||
'print'=40
|
||||
'lerp'=43
|
||||
'step'=44
|
||||
'smoothstep'=45
|
||||
'fract'=46
|
||||
'relu'=47
|
||||
'softplus'=48
|
||||
'gelu'=49
|
||||
'sign'=50
|
||||
'map'=51
|
||||
'swap'=54
|
||||
'range'=58
|
||||
'linspace'=59
|
||||
'logspace'=60
|
||||
'topk'=61
|
||||
'botk'=62
|
||||
'pinv'=63
|
||||
'sum'=64
|
||||
'mean'=65
|
||||
'std'=66
|
||||
'var'=67
|
||||
'prod'=68
|
||||
'isclose'=69
|
||||
'allclose'=70
|
||||
'quantile'=73
|
||||
'dot'=74
|
||||
'moment'=75
|
||||
'erf'=76
|
||||
'erfinv'=77
|
||||
'any'=78
|
||||
'all'=79
|
||||
'edge'=80
|
||||
'median'=82
|
||||
'mode'=83
|
||||
'cumsum'=84
|
||||
'cumprod'=85
|
||||
'smootherstep'=91
|
||||
'remap'=93
|
||||
'keys'=96
|
||||
'repeat'=104
|
||||
'flatten'=105
|
||||
'append'=106
|
||||
'get_value'=107
|
||||
'flow_apply'=108
|
||||
'motion_mask'=110
|
||||
'flow_to_image'=111
|
||||
'where'=114
|
||||
'overlay'=116
|
||||
'pad'=117
|
||||
'cross'=118
|
||||
'matmul'=119
|
||||
'rife'=120
|
||||
'shape'=123
|
||||
'tensor'=127
|
||||
'add_key'=128
|
||||
'stack_push'=130
|
||||
'stack_pop'=131
|
||||
'stack_clear'=132
|
||||
'stack_has'=133
|
||||
'stack_get'=134
|
||||
'stack'=136
|
||||
'nonzero'=137
|
||||
'int'=138
|
||||
'float'=139
|
||||
'upper'=140
|
||||
'lower'=141
|
||||
'trim'=142
|
||||
'split'=143
|
||||
'join'=144
|
||||
'find'=146
|
||||
'replace'=147
|
||||
'dilate'=148
|
||||
'erode'=149
|
||||
'morph_open'=150
|
||||
'morph_close'=151
|
||||
'rgb_to_oklab'=152
|
||||
'rgb_to_cielab'=153
|
||||
'oklab_to_rgb'=154
|
||||
'cielab_to_rgb'=155
|
||||
'rgb_to_hsv'=156
|
||||
'hsv_to_rgb'=157
|
||||
'int_to_rgb'=158
|
||||
'rgb_to_int'=159
|
||||
'interpolate_linear'=160
|
||||
'interpolate_area'=161
|
||||
'text_image'=163
|
||||
'if'=167
|
||||
'else'=168
|
||||
'while'=169
|
||||
'for'=170
|
||||
'in'=171
|
||||
'break'=172
|
||||
'continue'=173
|
||||
'return'=174
|
||||
'sort'=176
|
||||
'argsort'=177
|
||||
'argmin'=178
|
||||
'argmax'=179
|
||||
'softmax'=180
|
||||
'softmin'=181
|
||||
'unique'=182
|
||||
'flip'=183
|
||||
'startswith'=184
|
||||
'endswith'=185
|
||||
'squeeze'=186
|
||||
'unsqueeze'=187
|
||||
'roll'=188
|
||||
'cov'=189
|
||||
'entropy'=191
|
||||
'crop'=192
|
||||
'gather'=195
|
||||
'scatter'=196
|
||||
'scatter_add'=197
|
||||
'+'=217
|
||||
'-'=218
|
||||
'*'=219
|
||||
'/'=220
|
||||
'%'=221
|
||||
'^'=222
|
||||
'<<'=223
|
||||
'>>'=224
|
||||
'>='=225
|
||||
'>'=226
|
||||
'<='=227
|
||||
'<'=228
|
||||
'=='=229
|
||||
'='=230
|
||||
'+='=231
|
||||
'-='=232
|
||||
'*='=233
|
||||
'/='=234
|
||||
'%='=235
|
||||
'!='=236
|
||||
'|'=237
|
||||
'('=238
|
||||
')'=239
|
||||
','=240
|
||||
';'=241
|
||||
'->'=242
|
||||
'['=243
|
||||
']'=244
|
||||
'?'=245
|
||||
':'=246
|
||||
'{'=247
|
||||
'}'=248
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1486
-1444
File diff suppressed because it is too large
Load Diff
@@ -16,235 +16,243 @@ SQRT=15
|
||||
LN=16
|
||||
LOG=17
|
||||
EXP=18
|
||||
SMIN=19
|
||||
SMAX=20
|
||||
TMIN=21
|
||||
TMAX=22
|
||||
TNORM=23
|
||||
SNORM=24
|
||||
FLOOR=25
|
||||
CEIL=26
|
||||
ROUND=27
|
||||
GAMMA=28
|
||||
POWE=29
|
||||
SIGM=30
|
||||
CLAMP=31
|
||||
SFFT=32
|
||||
SIFFT=33
|
||||
ANGL=34
|
||||
PRNT=35
|
||||
PRINT_SHAPE=36
|
||||
NVL=37
|
||||
LERP=38
|
||||
STEP=39
|
||||
SMOOTHSTEP=40
|
||||
FRACT=41
|
||||
RELU=42
|
||||
SOFTPLUS=43
|
||||
GELU=44
|
||||
SIGN=45
|
||||
MAP=46
|
||||
EZCONV=47
|
||||
CONV=48
|
||||
SWAP=49
|
||||
TRANSPOSE=50
|
||||
PERM=51
|
||||
RESHAPE=52
|
||||
RANGE=53
|
||||
LINSPACE=54
|
||||
LOGSPACE=55
|
||||
TOPK=56
|
||||
BOTK=57
|
||||
PINV=58
|
||||
SUM=59
|
||||
MEAN=60
|
||||
STD=61
|
||||
VAR=62
|
||||
QUARTILE=63
|
||||
PERCENTILE=64
|
||||
QUANTILE=65
|
||||
DOT=66
|
||||
MOMENT=67
|
||||
ERF=68
|
||||
ERFINV=69
|
||||
ANY=70
|
||||
ALL=71
|
||||
EDGE=72
|
||||
GAUSSIAN=73
|
||||
MEDIAN=74
|
||||
MODE=75
|
||||
CUMSUM=76
|
||||
CUMPROD=77
|
||||
TOPK_IND=78
|
||||
BOTK_IND=79
|
||||
CUBIC_EASE=80
|
||||
ELASTIC_EASE=81
|
||||
SINE_EASE=82
|
||||
SMOOTHERSTEP=83
|
||||
DIST=84
|
||||
REMAP=85
|
||||
COSSIM=86
|
||||
COUNT=87
|
||||
KEYS=88
|
||||
ENABLE_TRACKING=89
|
||||
DISABLE_TRACKING=90
|
||||
RESET_TRACKING=91
|
||||
GET_CHANGED_KEYS=92
|
||||
GET_ADDED_KEYS=93
|
||||
GET_REMOVED_KEYS=94
|
||||
GET_UNCHANGED_KEYS=95
|
||||
REPEAT=96
|
||||
FLATTEN=97
|
||||
APPEND=98
|
||||
GET_VALUE=99
|
||||
FLOW_APPLY=100
|
||||
BATCH_SHUFFLE=101
|
||||
MOTION_MASK=102
|
||||
FLOW_TO_IMAGE=103
|
||||
FLOW_MAG=104
|
||||
FLOW_ANG=105
|
||||
WHERE=106
|
||||
HISTOGRAM=107
|
||||
OVERLAY=108
|
||||
PAD=109
|
||||
CROSS=110
|
||||
MATMUL=111
|
||||
RIFE=112
|
||||
BNOT=113
|
||||
BITCOUNT=114
|
||||
SHAPE=115
|
||||
BAND=116
|
||||
XOR=117
|
||||
BOR=118
|
||||
TENSOR=119
|
||||
ADD_KEY=120
|
||||
REMOVE_KEY=121
|
||||
PUSH=122
|
||||
POP=123
|
||||
CLEAR=124
|
||||
HAS=125
|
||||
GET=126
|
||||
CONCAT=127
|
||||
STACK=128
|
||||
NONZERO=129
|
||||
INT=130
|
||||
FLOAT=131
|
||||
UPPER=132
|
||||
LOWER=133
|
||||
TRIM=134
|
||||
SPLIT=135
|
||||
JOIN=136
|
||||
SUBSTRING=137
|
||||
FIND=138
|
||||
REPLACE=139
|
||||
DILATE=140
|
||||
ERODE=141
|
||||
MORPH_OPEN=142
|
||||
MORPH_CLOSE=143
|
||||
RGB_TO_OKLAB=144
|
||||
RGB_TO_CIELAB=145
|
||||
OKLAB_TO_RGB=146
|
||||
CIELAB_TO_RGB=147
|
||||
RGB_TO_HSV=148
|
||||
HSV_TO_RGB=149
|
||||
INT_TO_RGB=150
|
||||
RGB_TO_INT=151
|
||||
INTERPOLATE_LINEAR=152
|
||||
INTERPOLATE_AREA=153
|
||||
INTERPOLATE_NEAREST=154
|
||||
TEXT_IMAGE=155
|
||||
AS_NESTED=156
|
||||
SVD=157
|
||||
DIAG=158
|
||||
IF=159
|
||||
ELSE=160
|
||||
WHILE=161
|
||||
FOR=162
|
||||
IN=163
|
||||
BREAK=164
|
||||
CONTINUE=165
|
||||
RETURN=166
|
||||
TIMESTAMP=167
|
||||
SORT=168
|
||||
ARGSORT=169
|
||||
ARGMIN=170
|
||||
ARGMAX=171
|
||||
SOFTMAX=172
|
||||
SOFTMIN=173
|
||||
UNIQUE=174
|
||||
FLIP=175
|
||||
STARTSWITH=176
|
||||
ENDSWITH=177
|
||||
SQUEEZE=178
|
||||
UNSQUEEZE=179
|
||||
ROLL=180
|
||||
COV=181
|
||||
CORR=182
|
||||
ENTROPY=183
|
||||
CROP=184
|
||||
NONE=185
|
||||
COORDS=186
|
||||
GATHER=187
|
||||
SCATTER=188
|
||||
SCATTER_ADD=189
|
||||
NOISE=190
|
||||
RAND=191
|
||||
CAUCHY=192
|
||||
EXPONENTIAL=193
|
||||
LOGNORMAL=194
|
||||
BERNOULLI=195
|
||||
POISSON=196
|
||||
GAMMADIST=197
|
||||
BETADIST=198
|
||||
LAPLACEDIST=199
|
||||
GUMBELDIST=200
|
||||
WEIBULLDIST=201
|
||||
CHI2DIST=202
|
||||
STUDENTTDIST=203
|
||||
PERLIN=204
|
||||
CELLULAR=205
|
||||
PLASMA=206
|
||||
RIDGED=207
|
||||
DOMAIN_WARP=208
|
||||
PLUS=209
|
||||
MINUS=210
|
||||
MULT=211
|
||||
DIV=212
|
||||
MOD=213
|
||||
POW=214
|
||||
LSHIFT=215
|
||||
RSHIFT=216
|
||||
GE=217
|
||||
GT=218
|
||||
LE=219
|
||||
LT=220
|
||||
EQ=221
|
||||
EQUEALS=222
|
||||
PLUS_EQ=223
|
||||
MINUS_EQ=224
|
||||
MULT_EQ=225
|
||||
DIV_EQ=226
|
||||
MOD_EQ=227
|
||||
NE=228
|
||||
PIPE=229
|
||||
LPAREN=230
|
||||
RPAREN=231
|
||||
COMMA=232
|
||||
SEMICOLON=233
|
||||
ARROW=234
|
||||
LBRACKET=235
|
||||
RBRACKET=236
|
||||
QUESTION=237
|
||||
COLON=238
|
||||
LBRACE=239
|
||||
RBRACE=240
|
||||
NUMBER=241
|
||||
CONSTANT=242
|
||||
STRING=243
|
||||
VARIABLE=244
|
||||
SL_COMMENT=245
|
||||
ML_COMMENT=246
|
||||
WS=247
|
||||
LOG1P=19
|
||||
EXPM1=20
|
||||
ISNAN=21
|
||||
ISINF=22
|
||||
ISFINITE=23
|
||||
SMIN=24
|
||||
SMAX=25
|
||||
TMIN=26
|
||||
TMAX=27
|
||||
TNORM=28
|
||||
SNORM=29
|
||||
FLOOR=30
|
||||
CEIL=31
|
||||
ROUND=32
|
||||
GAMMA=33
|
||||
POWE=34
|
||||
SIGM=35
|
||||
CLAMP=36
|
||||
SFFT=37
|
||||
SIFFT=38
|
||||
ANGL=39
|
||||
PRNT=40
|
||||
PRINT_SHAPE=41
|
||||
NVL=42
|
||||
LERP=43
|
||||
STEP=44
|
||||
SMOOTHSTEP=45
|
||||
FRACT=46
|
||||
RELU=47
|
||||
SOFTPLUS=48
|
||||
GELU=49
|
||||
SIGN=50
|
||||
MAP=51
|
||||
EZCONV=52
|
||||
CONV=53
|
||||
SWAP=54
|
||||
TRANSPOSE=55
|
||||
PERM=56
|
||||
RESHAPE=57
|
||||
RANGE=58
|
||||
LINSPACE=59
|
||||
LOGSPACE=60
|
||||
TOPK=61
|
||||
BOTK=62
|
||||
PINV=63
|
||||
SUM=64
|
||||
MEAN=65
|
||||
STD=66
|
||||
VAR=67
|
||||
PROD=68
|
||||
ISCLOSE=69
|
||||
ALLCLOSE=70
|
||||
QUARTILE=71
|
||||
PERCENTILE=72
|
||||
QUANTILE=73
|
||||
DOT=74
|
||||
MOMENT=75
|
||||
ERF=76
|
||||
ERFINV=77
|
||||
ANY=78
|
||||
ALL=79
|
||||
EDGE=80
|
||||
GAUSSIAN=81
|
||||
MEDIAN=82
|
||||
MODE=83
|
||||
CUMSUM=84
|
||||
CUMPROD=85
|
||||
TOPK_IND=86
|
||||
BOTK_IND=87
|
||||
CUBIC_EASE=88
|
||||
ELASTIC_EASE=89
|
||||
SINE_EASE=90
|
||||
SMOOTHERSTEP=91
|
||||
DIST=92
|
||||
REMAP=93
|
||||
COSSIM=94
|
||||
COUNT=95
|
||||
KEYS=96
|
||||
ENABLE_TRACKING=97
|
||||
DISABLE_TRACKING=98
|
||||
RESET_TRACKING=99
|
||||
GET_CHANGED_KEYS=100
|
||||
GET_ADDED_KEYS=101
|
||||
GET_REMOVED_KEYS=102
|
||||
GET_UNCHANGED_KEYS=103
|
||||
REPEAT=104
|
||||
FLATTEN=105
|
||||
APPEND=106
|
||||
GET_VALUE=107
|
||||
FLOW_APPLY=108
|
||||
BATCH_SHUFFLE=109
|
||||
MOTION_MASK=110
|
||||
FLOW_TO_IMAGE=111
|
||||
FLOW_MAG=112
|
||||
FLOW_ANG=113
|
||||
WHERE=114
|
||||
HISTOGRAM=115
|
||||
OVERLAY=116
|
||||
PAD=117
|
||||
CROSS=118
|
||||
MATMUL=119
|
||||
RIFE=120
|
||||
BNOT=121
|
||||
BITCOUNT=122
|
||||
SHAPE=123
|
||||
BAND=124
|
||||
XOR=125
|
||||
BOR=126
|
||||
TENSOR=127
|
||||
ADD_KEY=128
|
||||
REMOVE_KEY=129
|
||||
PUSH=130
|
||||
POP=131
|
||||
CLEAR=132
|
||||
HAS=133
|
||||
GET=134
|
||||
CONCAT=135
|
||||
STACK=136
|
||||
NONZERO=137
|
||||
INT=138
|
||||
FLOAT=139
|
||||
UPPER=140
|
||||
LOWER=141
|
||||
TRIM=142
|
||||
SPLIT=143
|
||||
JOIN=144
|
||||
SUBSTRING=145
|
||||
FIND=146
|
||||
REPLACE=147
|
||||
DILATE=148
|
||||
ERODE=149
|
||||
MORPH_OPEN=150
|
||||
MORPH_CLOSE=151
|
||||
RGB_TO_OKLAB=152
|
||||
RGB_TO_CIELAB=153
|
||||
OKLAB_TO_RGB=154
|
||||
CIELAB_TO_RGB=155
|
||||
RGB_TO_HSV=156
|
||||
HSV_TO_RGB=157
|
||||
INT_TO_RGB=158
|
||||
RGB_TO_INT=159
|
||||
INTERPOLATE_LINEAR=160
|
||||
INTERPOLATE_AREA=161
|
||||
INTERPOLATE_NEAREST=162
|
||||
TEXT_IMAGE=163
|
||||
AS_NESTED=164
|
||||
SVD=165
|
||||
DIAG=166
|
||||
IF=167
|
||||
ELSE=168
|
||||
WHILE=169
|
||||
FOR=170
|
||||
IN=171
|
||||
BREAK=172
|
||||
CONTINUE=173
|
||||
RETURN=174
|
||||
TIMESTAMP=175
|
||||
SORT=176
|
||||
ARGSORT=177
|
||||
ARGMIN=178
|
||||
ARGMAX=179
|
||||
SOFTMAX=180
|
||||
SOFTMIN=181
|
||||
UNIQUE=182
|
||||
FLIP=183
|
||||
STARTSWITH=184
|
||||
ENDSWITH=185
|
||||
SQUEEZE=186
|
||||
UNSQUEEZE=187
|
||||
ROLL=188
|
||||
COV=189
|
||||
CORR=190
|
||||
ENTROPY=191
|
||||
CROP=192
|
||||
NONE=193
|
||||
COORDS=194
|
||||
GATHER=195
|
||||
SCATTER=196
|
||||
SCATTER_ADD=197
|
||||
NOISE=198
|
||||
RAND=199
|
||||
CAUCHY=200
|
||||
EXPONENTIAL=201
|
||||
LOGNORMAL=202
|
||||
BERNOULLI=203
|
||||
POISSON=204
|
||||
GAMMADIST=205
|
||||
BETADIST=206
|
||||
LAPLACEDIST=207
|
||||
GUMBELDIST=208
|
||||
WEIBULLDIST=209
|
||||
CHI2DIST=210
|
||||
STUDENTTDIST=211
|
||||
PERLIN=212
|
||||
CELLULAR=213
|
||||
PLASMA=214
|
||||
RIDGED=215
|
||||
DOMAIN_WARP=216
|
||||
PLUS=217
|
||||
MINUS=218
|
||||
MULT=219
|
||||
DIV=220
|
||||
MOD=221
|
||||
POW=222
|
||||
LSHIFT=223
|
||||
RSHIFT=224
|
||||
GE=225
|
||||
GT=226
|
||||
LE=227
|
||||
LT=228
|
||||
EQ=229
|
||||
EQUEALS=230
|
||||
PLUS_EQ=231
|
||||
MINUS_EQ=232
|
||||
MULT_EQ=233
|
||||
DIV_EQ=234
|
||||
MOD_EQ=235
|
||||
NE=236
|
||||
PIPE=237
|
||||
LPAREN=238
|
||||
RPAREN=239
|
||||
COMMA=240
|
||||
SEMICOLON=241
|
||||
ARROW=242
|
||||
LBRACKET=243
|
||||
RBRACKET=244
|
||||
QUESTION=245
|
||||
COLON=246
|
||||
LBRACE=247
|
||||
RBRACE=248
|
||||
NUMBER=249
|
||||
CONSTANT=250
|
||||
STRING=251
|
||||
VARIABLE=252
|
||||
SL_COMMENT=253
|
||||
ML_COMMENT=254
|
||||
WS=255
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -263,161 +271,169 @@ WS=247
|
||||
'ln'=16
|
||||
'log'=17
|
||||
'exp'=18
|
||||
'smin'=19
|
||||
'smax'=20
|
||||
'tmin'=21
|
||||
'tmax'=22
|
||||
'tnorm'=23
|
||||
'snorm'=24
|
||||
'floor'=25
|
||||
'ceil'=26
|
||||
'round'=27
|
||||
'gamma'=28
|
||||
'pow'=29
|
||||
'sigm'=30
|
||||
'clamp'=31
|
||||
'fft'=32
|
||||
'ifft'=33
|
||||
'angle'=34
|
||||
'print'=35
|
||||
'lerp'=38
|
||||
'step'=39
|
||||
'smoothstep'=40
|
||||
'fract'=41
|
||||
'relu'=42
|
||||
'softplus'=43
|
||||
'gelu'=44
|
||||
'sign'=45
|
||||
'map'=46
|
||||
'swap'=49
|
||||
'range'=53
|
||||
'linspace'=54
|
||||
'logspace'=55
|
||||
'topk'=56
|
||||
'botk'=57
|
||||
'pinv'=58
|
||||
'sum'=59
|
||||
'mean'=60
|
||||
'std'=61
|
||||
'var'=62
|
||||
'quantile'=65
|
||||
'dot'=66
|
||||
'moment'=67
|
||||
'erf'=68
|
||||
'erfinv'=69
|
||||
'any'=70
|
||||
'all'=71
|
||||
'edge'=72
|
||||
'median'=74
|
||||
'mode'=75
|
||||
'cumsum'=76
|
||||
'cumprod'=77
|
||||
'smootherstep'=83
|
||||
'remap'=85
|
||||
'keys'=88
|
||||
'repeat'=96
|
||||
'flatten'=97
|
||||
'append'=98
|
||||
'get_value'=99
|
||||
'flow_apply'=100
|
||||
'motion_mask'=102
|
||||
'flow_to_image'=103
|
||||
'where'=106
|
||||
'overlay'=108
|
||||
'pad'=109
|
||||
'cross'=110
|
||||
'matmul'=111
|
||||
'rife'=112
|
||||
'shape'=115
|
||||
'tensor'=119
|
||||
'add_key'=120
|
||||
'stack_push'=122
|
||||
'stack_pop'=123
|
||||
'stack_clear'=124
|
||||
'stack_has'=125
|
||||
'stack_get'=126
|
||||
'stack'=128
|
||||
'nonzero'=129
|
||||
'int'=130
|
||||
'float'=131
|
||||
'upper'=132
|
||||
'lower'=133
|
||||
'trim'=134
|
||||
'split'=135
|
||||
'join'=136
|
||||
'find'=138
|
||||
'replace'=139
|
||||
'dilate'=140
|
||||
'erode'=141
|
||||
'morph_open'=142
|
||||
'morph_close'=143
|
||||
'rgb_to_oklab'=144
|
||||
'rgb_to_cielab'=145
|
||||
'oklab_to_rgb'=146
|
||||
'cielab_to_rgb'=147
|
||||
'rgb_to_hsv'=148
|
||||
'hsv_to_rgb'=149
|
||||
'int_to_rgb'=150
|
||||
'rgb_to_int'=151
|
||||
'interpolate_linear'=152
|
||||
'interpolate_area'=153
|
||||
'text_image'=155
|
||||
'if'=159
|
||||
'else'=160
|
||||
'while'=161
|
||||
'for'=162
|
||||
'in'=163
|
||||
'break'=164
|
||||
'continue'=165
|
||||
'return'=166
|
||||
'sort'=168
|
||||
'argsort'=169
|
||||
'argmin'=170
|
||||
'argmax'=171
|
||||
'softmax'=172
|
||||
'softmin'=173
|
||||
'unique'=174
|
||||
'flip'=175
|
||||
'startswith'=176
|
||||
'endswith'=177
|
||||
'squeeze'=178
|
||||
'unsqueeze'=179
|
||||
'roll'=180
|
||||
'cov'=181
|
||||
'entropy'=183
|
||||
'crop'=184
|
||||
'gather'=187
|
||||
'scatter'=188
|
||||
'scatter_add'=189
|
||||
'+'=209
|
||||
'-'=210
|
||||
'*'=211
|
||||
'/'=212
|
||||
'%'=213
|
||||
'^'=214
|
||||
'<<'=215
|
||||
'>>'=216
|
||||
'>='=217
|
||||
'>'=218
|
||||
'<='=219
|
||||
'<'=220
|
||||
'=='=221
|
||||
'='=222
|
||||
'+='=223
|
||||
'-='=224
|
||||
'*='=225
|
||||
'/='=226
|
||||
'%='=227
|
||||
'!='=228
|
||||
'|'=229
|
||||
'('=230
|
||||
')'=231
|
||||
','=232
|
||||
';'=233
|
||||
'->'=234
|
||||
'['=235
|
||||
']'=236
|
||||
'?'=237
|
||||
':'=238
|
||||
'{'=239
|
||||
'}'=240
|
||||
'log1p'=19
|
||||
'expm1'=20
|
||||
'isnan'=21
|
||||
'isinf'=22
|
||||
'isfinite'=23
|
||||
'smin'=24
|
||||
'smax'=25
|
||||
'tmin'=26
|
||||
'tmax'=27
|
||||
'tnorm'=28
|
||||
'snorm'=29
|
||||
'floor'=30
|
||||
'ceil'=31
|
||||
'round'=32
|
||||
'gamma'=33
|
||||
'pow'=34
|
||||
'sigm'=35
|
||||
'clamp'=36
|
||||
'fft'=37
|
||||
'ifft'=38
|
||||
'angle'=39
|
||||
'print'=40
|
||||
'lerp'=43
|
||||
'step'=44
|
||||
'smoothstep'=45
|
||||
'fract'=46
|
||||
'relu'=47
|
||||
'softplus'=48
|
||||
'gelu'=49
|
||||
'sign'=50
|
||||
'map'=51
|
||||
'swap'=54
|
||||
'range'=58
|
||||
'linspace'=59
|
||||
'logspace'=60
|
||||
'topk'=61
|
||||
'botk'=62
|
||||
'pinv'=63
|
||||
'sum'=64
|
||||
'mean'=65
|
||||
'std'=66
|
||||
'var'=67
|
||||
'prod'=68
|
||||
'isclose'=69
|
||||
'allclose'=70
|
||||
'quantile'=73
|
||||
'dot'=74
|
||||
'moment'=75
|
||||
'erf'=76
|
||||
'erfinv'=77
|
||||
'any'=78
|
||||
'all'=79
|
||||
'edge'=80
|
||||
'median'=82
|
||||
'mode'=83
|
||||
'cumsum'=84
|
||||
'cumprod'=85
|
||||
'smootherstep'=91
|
||||
'remap'=93
|
||||
'keys'=96
|
||||
'repeat'=104
|
||||
'flatten'=105
|
||||
'append'=106
|
||||
'get_value'=107
|
||||
'flow_apply'=108
|
||||
'motion_mask'=110
|
||||
'flow_to_image'=111
|
||||
'where'=114
|
||||
'overlay'=116
|
||||
'pad'=117
|
||||
'cross'=118
|
||||
'matmul'=119
|
||||
'rife'=120
|
||||
'shape'=123
|
||||
'tensor'=127
|
||||
'add_key'=128
|
||||
'stack_push'=130
|
||||
'stack_pop'=131
|
||||
'stack_clear'=132
|
||||
'stack_has'=133
|
||||
'stack_get'=134
|
||||
'stack'=136
|
||||
'nonzero'=137
|
||||
'int'=138
|
||||
'float'=139
|
||||
'upper'=140
|
||||
'lower'=141
|
||||
'trim'=142
|
||||
'split'=143
|
||||
'join'=144
|
||||
'find'=146
|
||||
'replace'=147
|
||||
'dilate'=148
|
||||
'erode'=149
|
||||
'morph_open'=150
|
||||
'morph_close'=151
|
||||
'rgb_to_oklab'=152
|
||||
'rgb_to_cielab'=153
|
||||
'oklab_to_rgb'=154
|
||||
'cielab_to_rgb'=155
|
||||
'rgb_to_hsv'=156
|
||||
'hsv_to_rgb'=157
|
||||
'int_to_rgb'=158
|
||||
'rgb_to_int'=159
|
||||
'interpolate_linear'=160
|
||||
'interpolate_area'=161
|
||||
'text_image'=163
|
||||
'if'=167
|
||||
'else'=168
|
||||
'while'=169
|
||||
'for'=170
|
||||
'in'=171
|
||||
'break'=172
|
||||
'continue'=173
|
||||
'return'=174
|
||||
'sort'=176
|
||||
'argsort'=177
|
||||
'argmin'=178
|
||||
'argmax'=179
|
||||
'softmax'=180
|
||||
'softmin'=181
|
||||
'unique'=182
|
||||
'flip'=183
|
||||
'startswith'=184
|
||||
'endswith'=185
|
||||
'squeeze'=186
|
||||
'unsqueeze'=187
|
||||
'roll'=188
|
||||
'cov'=189
|
||||
'entropy'=191
|
||||
'crop'=192
|
||||
'gather'=195
|
||||
'scatter'=196
|
||||
'scatter_add'=197
|
||||
'+'=217
|
||||
'-'=218
|
||||
'*'=219
|
||||
'/'=220
|
||||
'%'=221
|
||||
'^'=222
|
||||
'<<'=223
|
||||
'>>'=224
|
||||
'>='=225
|
||||
'>'=226
|
||||
'<='=227
|
||||
'<'=228
|
||||
'=='=229
|
||||
'='=230
|
||||
'+='=231
|
||||
'-='=232
|
||||
'*='=233
|
||||
'/='=234
|
||||
'%='=235
|
||||
'!='=236
|
||||
'|'=237
|
||||
'('=238
|
||||
')'=239
|
||||
','=240
|
||||
';'=241
|
||||
'->'=242
|
||||
'['=243
|
||||
']'=244
|
||||
'?'=245
|
||||
':'=246
|
||||
'{'=247
|
||||
'}'=248
|
||||
|
||||
@@ -890,6 +890,51 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#Log1pFunc.
|
||||
def enterLog1pFunc(self, ctx:MathExprParser.Log1pFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#Log1pFunc.
|
||||
def exitLog1pFunc(self, ctx:MathExprParser.Log1pFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#Expm1Func.
|
||||
def enterExpm1Func(self, ctx:MathExprParser.Expm1FuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#Expm1Func.
|
||||
def exitExpm1Func(self, ctx:MathExprParser.Expm1FuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IsnanFunc.
|
||||
def enterIsnanFunc(self, ctx:MathExprParser.IsnanFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IsnanFunc.
|
||||
def exitIsnanFunc(self, ctx:MathExprParser.IsnanFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IsinfFunc.
|
||||
def enterIsinfFunc(self, ctx:MathExprParser.IsinfFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IsinfFunc.
|
||||
def exitIsinfFunc(self, ctx:MathExprParser.IsinfFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IsfiniteFunc.
|
||||
def enterIsfiniteFunc(self, ctx:MathExprParser.IsfiniteFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IsfiniteFunc.
|
||||
def exitIsfiniteFunc(self, ctx:MathExprParser.IsfiniteFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#TNormFunc.
|
||||
def enterTNormFunc(self, ctx:MathExprParser.TNormFuncContext):
|
||||
pass
|
||||
@@ -1061,6 +1106,15 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#ProdFunc.
|
||||
def enterProdFunc(self, ctx:MathExprParser.ProdFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#ProdFunc.
|
||||
def exitProdFunc(self, ctx:MathExprParser.ProdFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#SortFunc.
|
||||
def enterSortFunc(self, ctx:MathExprParser.SortFuncContext):
|
||||
pass
|
||||
@@ -1502,6 +1556,24 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IscloseFunc.
|
||||
def enterIscloseFunc(self, ctx:MathExprParser.IscloseFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IscloseFunc.
|
||||
def exitIscloseFunc(self, ctx:MathExprParser.IscloseFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#AllcloseFunc.
|
||||
def enterAllcloseFunc(self, ctx:MathExprParser.AllcloseFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#AllcloseFunc.
|
||||
def exitAllcloseFunc(self, ctx:MathExprParser.AllcloseFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#TMinFunc.
|
||||
def enterTMinFunc(self, ctx:MathExprParser.TMinFuncContext):
|
||||
pass
|
||||
|
||||
+4814
-4303
File diff suppressed because it is too large
Load Diff
@@ -499,6 +499,31 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#Log1pFunc.
|
||||
def visitLog1pFunc(self, ctx:MathExprParser.Log1pFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#Expm1Func.
|
||||
def visitExpm1Func(self, ctx:MathExprParser.Expm1FuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IsnanFunc.
|
||||
def visitIsnanFunc(self, ctx:MathExprParser.IsnanFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IsinfFunc.
|
||||
def visitIsinfFunc(self, ctx:MathExprParser.IsinfFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IsfiniteFunc.
|
||||
def visitIsfiniteFunc(self, ctx:MathExprParser.IsfiniteFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#TNormFunc.
|
||||
def visitTNormFunc(self, ctx:MathExprParser.TNormFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
@@ -594,6 +619,11 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#ProdFunc.
|
||||
def visitProdFunc(self, ctx:MathExprParser.ProdFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#SortFunc.
|
||||
def visitSortFunc(self, ctx:MathExprParser.SortFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
@@ -839,6 +869,16 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IscloseFunc.
|
||||
def visitIscloseFunc(self, ctx:MathExprParser.IscloseFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#AllcloseFunc.
|
||||
def visitAllcloseFunc(self, ctx:MathExprParser.AllcloseFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#TMinFunc.
|
||||
def visitTMinFunc(self, ctx:MathExprParser.TMinFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
@@ -6,7 +6,7 @@ INBUILT_CONSTANTS = {
|
||||
'e', 'pi'
|
||||
}
|
||||
INBUILT_FUNCTIONS = {
|
||||
'abs', 'acos', 'acosh', 'add_key', 'added_keys', 'all', 'angle', 'any', 'append', 'argmax', 'argmin', 'argsort', 'as_nested', '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', 'disable_tracking', 'dist', 'distance', 'domain_warp', 'domain_warp_noise', 'dot', 'edge', 'elastic', 'elastic_ease', 'enable_tracking', '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', 'gather', 'gaussian', 'gelu', 'get_added_keys', 'get_changed_keys', 'get_removed_keys', 'get_unchanged_keys', 'get_value', 'hist', 'histogram', 'hsv_to_rgb', 'changed_keys', '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', 'nonzero', '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', 'removed_keys', 'repeat', 'replace', 'reset_tracking', 'reshape', 'rgb_to_cielab', 'rgb_to_hsv', 'rgb_to_int', 'rgb_to_oklab', 'ridged', 'ridged_noise', 'rife', 'rm_key', 'roll', 'round', 'rshp', 'scatter', 'scatter_add', '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', 'stack_clear', 'stack_get', 'stack_has', 'stack_pop', 'stack_push', 'startswith', 'std', 'step', 'substr', 'substring', 'sum', 'svd', 'swap', 'swapaxes', 'tan', 'tanh', 'tensor', 'text_image', 'timestamp', 'tmax', 'tmin', 'tnorm', 'topk', 'topk_ind', 'topk_indices', 'track_off', 'track_on', 'track_reset', 'transpose', 'trim', 'turbulence', 'unchanged_keys', 'unique', 'unsqueeze', 'upper', 'var', 'voronoi', 'voronoi_noise', 'where', 'worley'
|
||||
'abs', 'acos', 'acosh', 'add_key', 'added_keys', 'all', 'allclose', 'angle', 'any', 'append', 'argmax', 'argmin', 'argsort', 'as_nested', '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', 'disable_tracking', 'dist', 'distance', 'domain_warp', 'domain_warp_noise', 'dot', 'edge', 'elastic', 'elastic_ease', 'enable_tracking', 'endswith', 'entropy', 'erf', 'erfinv', 'erode', 'exp', 'expm1', 'ezconv', 'ezconvolution', 'fft', 'find', 'flatten', 'flip', 'float', 'floor', 'flow_ang', 'flow_angle', 'flow_apply', 'flow_mag', 'flow_magnitude', 'flow_to_image', 'fract', 'gamma', 'gather', 'gaussian', 'gelu', 'get_added_keys', 'get_changed_keys', 'get_removed_keys', 'get_unchanged_keys', 'get_value', 'hist', 'histogram', 'hsv_to_rgb', 'changed_keys', 'ifft', 'int', 'int_to_rgb', 'interpolate_area', 'interpolate_linear', 'interpolate_nearest', 'interpolate_nearest_exact', 'isclose', 'isfinite', 'isinf', 'isnan', 'join', 'keys', 'length', 'lerp', 'linspace', 'ln', 'log', 'log1p', 'logspace', 'lower', 'map', 'matmul', 'mean', 'median', 'mode', 'moment', 'morph_close', 'morph_open', 'motion_mask', 'nan_to_num', 'noise', 'nonzero', 'now', 'nvl', 'oklab_to_rgb', 'overlay', 'pad', 'percentile', 'perlin', 'perlin_noise', 'perm', 'permute', 'pinv', 'plasma', 'plasma_noise', 'popcnt', 'popcount', 'pow', 'prcnt', 'print', 'print_shape', 'prod', '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', 'removed_keys', 'repeat', 'replace', 'reset_tracking', 'reshape', 'rgb_to_cielab', 'rgb_to_hsv', 'rgb_to_int', 'rgb_to_oklab', 'ridged', 'ridged_noise', 'rife', 'rm_key', 'roll', 'round', 'rshp', 'scatter', 'scatter_add', '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', 'stack_clear', 'stack_get', 'stack_has', 'stack_pop', 'stack_push', 'startswith', 'std', 'step', 'substr', 'substring', 'sum', 'svd', 'swap', 'swapaxes', 'tan', 'tanh', 'tensor', 'text_image', 'timestamp', 'tmax', 'tmin', 'tnorm', 'topk', 'topk_ind', 'topk_indices', 'track_off', 'track_on', 'track_reset', 'transpose', 'trim', 'turbulence', 'unchanged_keys', 'unique', 'unsqueeze', 'upper', 'var', 'voronoi', 'voronoi_noise', 'where', 'worley'
|
||||
}
|
||||
|
||||
INBUILT_FUNCTION_META = {
|
||||
@@ -28,6 +28,11 @@ INBUILT_FUNCTION_META = {
|
||||
'ln': {'min_args': 1, 'max_args': 1, 'snippet': 'ln(x)', 'description': 'applies natural logarithm to value (per element). Negative numbers return NaN (not a number)'},
|
||||
'log': {'min_args': 1, 'max_args': 1, 'snippet': 'log(x)', 'description': 'applies base 10 logarithm to value (per element). Negative numbers return NaN (not a number)'},
|
||||
'exp': {'min_args': 1, 'max_args': 1, 'snippet': 'exp(x)', 'description': 'applies e^x to value (per element)'},
|
||||
'log1p': {'min_args': 1, 'max_args': 1, 'snippet': 'log1p(x)', 'description': 'applies ln(1+x) accurately for values near zero'},
|
||||
'expm1': {'min_args': 1, 'max_args': 1, 'snippet': 'expm1(x)', 'description': 'applies exp(x)-1 accurately for values near zero'},
|
||||
'isnan': {'min_args': 1, 'max_args': 1, 'snippet': 'isnan(x)', 'description': 'returns 1.0 for NaN values and 0.0 otherwise'},
|
||||
'isinf': {'min_args': 1, 'max_args': 1, 'snippet': 'isinf(x)', 'description': 'returns 1.0 for infinite values and 0.0 otherwise'},
|
||||
'isfinite': {'min_args': 1, 'max_args': 1, 'snippet': 'isfinite(x)', 'description': 'returns 1.0 for finite values and 0.0 otherwise'},
|
||||
'smin': {'min_args': 1, 'max_args': None, 'snippet': 'smin(x, ...)', 'description': 'computes the minimum of inputs or elements. Tensors must have the same size or be broadcastable to same size. When called as smin(x, dims) with x a tensor/list, reduces x along dims (a single dim or list of dims) instead.'},
|
||||
'smax': {'min_args': 1, 'max_args': None, 'snippet': 'smax(x, ...)', 'description': 'computes the maximum of inputs or elements. Tensors must have the same size or be broadcastable to same size. When called as smax(x, dims) with x a tensor/list, reduces x along dims (a single dim or list of dims) instead.'},
|
||||
'tmin': {'min_args': 2, 'max_args': 2, 'snippet': 'tmin(x, y)', 'description': 'elementwise minimum of tensor or list. min(x,y) when inputs are floats'},
|
||||
@@ -76,9 +81,12 @@ INBUILT_FUNCTION_META = {
|
||||
'botk': {'min_args': 2, 'max_args': 2, 'snippet': 'botk(x, k)', 'description': 'returns the k smallest elements of x. For tensors it keeps them in place.'},
|
||||
'pinv': {'min_args': 1, 'max_args': 1, 'snippet': 'pinv(x)', 'description': 'computes the permutative inverse of a list x (list must have uniqe elements) -- TODO: CHECK --'},
|
||||
'sum': {'min_args': 1, 'max_args': 2, 'snippet': 'sum(x, dims)', 'description': 'computes the sum of elements of x, optionally along one or more dimensions'},
|
||||
'mean': {'min_args': 1, 'max_args': 1, 'snippet': 'mean(x)', 'description': 'computes the arithmetic mean of elements of x'},
|
||||
'std': {'min_args': 1, 'max_args': 1, 'snippet': 'std(x)', 'description': 'computes the standard deviation of elements of x'},
|
||||
'var': {'min_args': 1, 'max_args': 1, 'snippet': 'var(x)', 'description': 'computes the variance of elements of x'},
|
||||
'mean': {'min_args': 1, 'max_args': 2, 'snippet': 'mean(x, dims)', 'description': 'computes the arithmetic mean of elements of x globally or along one or more dimensions'},
|
||||
'std': {'min_args': 1, 'max_args': 2, 'snippet': 'std(x, dims)', 'description': 'computes the sample standard deviation of elements of x globally or along one or more dimensions'},
|
||||
'var': {'min_args': 1, 'max_args': 2, 'snippet': 'var(x, dims)', 'description': 'computes the sample variance of elements of x globally or along one or more dimensions'},
|
||||
'prod': {'min_args': 1, 'max_args': 2, 'snippet': 'prod(x, dims)', 'description': 'computes the product of elements of x globally or along one or more dimensions'},
|
||||
'isclose': {'min_args': 2, 'max_args': 4, 'snippet': 'isclose(a, b, rtol, atol)', 'description': 'elementwise approximate equality test'},
|
||||
'allclose': {'min_args': 2, 'max_args': 4, 'snippet': 'allclose(a, b, rtol, atol)', 'description': 'returns 1.0 if all elements are approximately equal, else 0.0'},
|
||||
'quartile': {'min_args': 2, 'max_args': 2, 'snippet': 'quartile(x, q)', 'description': 'computes the q-th quartile of x'},
|
||||
'quartil': {'min_args': 2, 'max_args': 2, 'snippet': 'quartil(x, q)', 'description': 'computes the q-th quartile of x'},
|
||||
'percentile': {'min_args': 2, 'max_args': 2, 'snippet': 'percentile(x, p)', 'description': 'computes the p-th percentile of x'},
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16,235 +16,243 @@ SQRT=15
|
||||
LN=16
|
||||
LOG=17
|
||||
EXP=18
|
||||
SMIN=19
|
||||
SMAX=20
|
||||
TMIN=21
|
||||
TMAX=22
|
||||
TNORM=23
|
||||
SNORM=24
|
||||
FLOOR=25
|
||||
CEIL=26
|
||||
ROUND=27
|
||||
GAMMA=28
|
||||
POWE=29
|
||||
SIGM=30
|
||||
CLAMP=31
|
||||
SFFT=32
|
||||
SIFFT=33
|
||||
ANGL=34
|
||||
PRNT=35
|
||||
PRINT_SHAPE=36
|
||||
NVL=37
|
||||
LERP=38
|
||||
STEP=39
|
||||
SMOOTHSTEP=40
|
||||
FRACT=41
|
||||
RELU=42
|
||||
SOFTPLUS=43
|
||||
GELU=44
|
||||
SIGN=45
|
||||
MAP=46
|
||||
EZCONV=47
|
||||
CONV=48
|
||||
SWAP=49
|
||||
TRANSPOSE=50
|
||||
PERM=51
|
||||
RESHAPE=52
|
||||
RANGE=53
|
||||
LINSPACE=54
|
||||
LOGSPACE=55
|
||||
TOPK=56
|
||||
BOTK=57
|
||||
PINV=58
|
||||
SUM=59
|
||||
MEAN=60
|
||||
STD=61
|
||||
VAR=62
|
||||
QUARTILE=63
|
||||
PERCENTILE=64
|
||||
QUANTILE=65
|
||||
DOT=66
|
||||
MOMENT=67
|
||||
ERF=68
|
||||
ERFINV=69
|
||||
ANY=70
|
||||
ALL=71
|
||||
EDGE=72
|
||||
GAUSSIAN=73
|
||||
MEDIAN=74
|
||||
MODE=75
|
||||
CUMSUM=76
|
||||
CUMPROD=77
|
||||
TOPK_IND=78
|
||||
BOTK_IND=79
|
||||
CUBIC_EASE=80
|
||||
ELASTIC_EASE=81
|
||||
SINE_EASE=82
|
||||
SMOOTHERSTEP=83
|
||||
DIST=84
|
||||
REMAP=85
|
||||
COSSIM=86
|
||||
COUNT=87
|
||||
KEYS=88
|
||||
ENABLE_TRACKING=89
|
||||
DISABLE_TRACKING=90
|
||||
RESET_TRACKING=91
|
||||
GET_CHANGED_KEYS=92
|
||||
GET_ADDED_KEYS=93
|
||||
GET_REMOVED_KEYS=94
|
||||
GET_UNCHANGED_KEYS=95
|
||||
REPEAT=96
|
||||
FLATTEN=97
|
||||
APPEND=98
|
||||
GET_VALUE=99
|
||||
FLOW_APPLY=100
|
||||
BATCH_SHUFFLE=101
|
||||
MOTION_MASK=102
|
||||
FLOW_TO_IMAGE=103
|
||||
FLOW_MAG=104
|
||||
FLOW_ANG=105
|
||||
WHERE=106
|
||||
HISTOGRAM=107
|
||||
OVERLAY=108
|
||||
PAD=109
|
||||
CROSS=110
|
||||
MATMUL=111
|
||||
RIFE=112
|
||||
BNOT=113
|
||||
BITCOUNT=114
|
||||
SHAPE=115
|
||||
BAND=116
|
||||
XOR=117
|
||||
BOR=118
|
||||
TENSOR=119
|
||||
ADD_KEY=120
|
||||
REMOVE_KEY=121
|
||||
PUSH=122
|
||||
POP=123
|
||||
CLEAR=124
|
||||
HAS=125
|
||||
GET=126
|
||||
CONCAT=127
|
||||
STACK=128
|
||||
NONZERO=129
|
||||
INT=130
|
||||
FLOAT=131
|
||||
UPPER=132
|
||||
LOWER=133
|
||||
TRIM=134
|
||||
SPLIT=135
|
||||
JOIN=136
|
||||
SUBSTRING=137
|
||||
FIND=138
|
||||
REPLACE=139
|
||||
DILATE=140
|
||||
ERODE=141
|
||||
MORPH_OPEN=142
|
||||
MORPH_CLOSE=143
|
||||
RGB_TO_OKLAB=144
|
||||
RGB_TO_CIELAB=145
|
||||
OKLAB_TO_RGB=146
|
||||
CIELAB_TO_RGB=147
|
||||
RGB_TO_HSV=148
|
||||
HSV_TO_RGB=149
|
||||
INT_TO_RGB=150
|
||||
RGB_TO_INT=151
|
||||
INTERPOLATE_LINEAR=152
|
||||
INTERPOLATE_AREA=153
|
||||
INTERPOLATE_NEAREST=154
|
||||
TEXT_IMAGE=155
|
||||
AS_NESTED=156
|
||||
SVD=157
|
||||
DIAG=158
|
||||
IF=159
|
||||
ELSE=160
|
||||
WHILE=161
|
||||
FOR=162
|
||||
IN=163
|
||||
BREAK=164
|
||||
CONTINUE=165
|
||||
RETURN=166
|
||||
TIMESTAMP=167
|
||||
SORT=168
|
||||
ARGSORT=169
|
||||
ARGMIN=170
|
||||
ARGMAX=171
|
||||
SOFTMAX=172
|
||||
SOFTMIN=173
|
||||
UNIQUE=174
|
||||
FLIP=175
|
||||
STARTSWITH=176
|
||||
ENDSWITH=177
|
||||
SQUEEZE=178
|
||||
UNSQUEEZE=179
|
||||
ROLL=180
|
||||
COV=181
|
||||
CORR=182
|
||||
ENTROPY=183
|
||||
CROP=184
|
||||
NONE=185
|
||||
COORDS=186
|
||||
GATHER=187
|
||||
SCATTER=188
|
||||
SCATTER_ADD=189
|
||||
NOISE=190
|
||||
RAND=191
|
||||
CAUCHY=192
|
||||
EXPONENTIAL=193
|
||||
LOGNORMAL=194
|
||||
BERNOULLI=195
|
||||
POISSON=196
|
||||
GAMMADIST=197
|
||||
BETADIST=198
|
||||
LAPLACEDIST=199
|
||||
GUMBELDIST=200
|
||||
WEIBULLDIST=201
|
||||
CHI2DIST=202
|
||||
STUDENTTDIST=203
|
||||
PERLIN=204
|
||||
CELLULAR=205
|
||||
PLASMA=206
|
||||
RIDGED=207
|
||||
DOMAIN_WARP=208
|
||||
PLUS=209
|
||||
MINUS=210
|
||||
MULT=211
|
||||
DIV=212
|
||||
MOD=213
|
||||
POW=214
|
||||
LSHIFT=215
|
||||
RSHIFT=216
|
||||
GE=217
|
||||
GT=218
|
||||
LE=219
|
||||
LT=220
|
||||
EQ=221
|
||||
EQUEALS=222
|
||||
PLUS_EQ=223
|
||||
MINUS_EQ=224
|
||||
MULT_EQ=225
|
||||
DIV_EQ=226
|
||||
MOD_EQ=227
|
||||
NE=228
|
||||
PIPE=229
|
||||
LPAREN=230
|
||||
RPAREN=231
|
||||
COMMA=232
|
||||
SEMICOLON=233
|
||||
ARROW=234
|
||||
LBRACKET=235
|
||||
RBRACKET=236
|
||||
QUESTION=237
|
||||
COLON=238
|
||||
LBRACE=239
|
||||
RBRACE=240
|
||||
NUMBER=241
|
||||
CONSTANT=242
|
||||
STRING=243
|
||||
VARIABLE=244
|
||||
SL_COMMENT=245
|
||||
ML_COMMENT=246
|
||||
WS=247
|
||||
LOG1P=19
|
||||
EXPM1=20
|
||||
ISNAN=21
|
||||
ISINF=22
|
||||
ISFINITE=23
|
||||
SMIN=24
|
||||
SMAX=25
|
||||
TMIN=26
|
||||
TMAX=27
|
||||
TNORM=28
|
||||
SNORM=29
|
||||
FLOOR=30
|
||||
CEIL=31
|
||||
ROUND=32
|
||||
GAMMA=33
|
||||
POWE=34
|
||||
SIGM=35
|
||||
CLAMP=36
|
||||
SFFT=37
|
||||
SIFFT=38
|
||||
ANGL=39
|
||||
PRNT=40
|
||||
PRINT_SHAPE=41
|
||||
NVL=42
|
||||
LERP=43
|
||||
STEP=44
|
||||
SMOOTHSTEP=45
|
||||
FRACT=46
|
||||
RELU=47
|
||||
SOFTPLUS=48
|
||||
GELU=49
|
||||
SIGN=50
|
||||
MAP=51
|
||||
EZCONV=52
|
||||
CONV=53
|
||||
SWAP=54
|
||||
TRANSPOSE=55
|
||||
PERM=56
|
||||
RESHAPE=57
|
||||
RANGE=58
|
||||
LINSPACE=59
|
||||
LOGSPACE=60
|
||||
TOPK=61
|
||||
BOTK=62
|
||||
PINV=63
|
||||
SUM=64
|
||||
MEAN=65
|
||||
STD=66
|
||||
VAR=67
|
||||
PROD=68
|
||||
ISCLOSE=69
|
||||
ALLCLOSE=70
|
||||
QUARTILE=71
|
||||
PERCENTILE=72
|
||||
QUANTILE=73
|
||||
DOT=74
|
||||
MOMENT=75
|
||||
ERF=76
|
||||
ERFINV=77
|
||||
ANY=78
|
||||
ALL=79
|
||||
EDGE=80
|
||||
GAUSSIAN=81
|
||||
MEDIAN=82
|
||||
MODE=83
|
||||
CUMSUM=84
|
||||
CUMPROD=85
|
||||
TOPK_IND=86
|
||||
BOTK_IND=87
|
||||
CUBIC_EASE=88
|
||||
ELASTIC_EASE=89
|
||||
SINE_EASE=90
|
||||
SMOOTHERSTEP=91
|
||||
DIST=92
|
||||
REMAP=93
|
||||
COSSIM=94
|
||||
COUNT=95
|
||||
KEYS=96
|
||||
ENABLE_TRACKING=97
|
||||
DISABLE_TRACKING=98
|
||||
RESET_TRACKING=99
|
||||
GET_CHANGED_KEYS=100
|
||||
GET_ADDED_KEYS=101
|
||||
GET_REMOVED_KEYS=102
|
||||
GET_UNCHANGED_KEYS=103
|
||||
REPEAT=104
|
||||
FLATTEN=105
|
||||
APPEND=106
|
||||
GET_VALUE=107
|
||||
FLOW_APPLY=108
|
||||
BATCH_SHUFFLE=109
|
||||
MOTION_MASK=110
|
||||
FLOW_TO_IMAGE=111
|
||||
FLOW_MAG=112
|
||||
FLOW_ANG=113
|
||||
WHERE=114
|
||||
HISTOGRAM=115
|
||||
OVERLAY=116
|
||||
PAD=117
|
||||
CROSS=118
|
||||
MATMUL=119
|
||||
RIFE=120
|
||||
BNOT=121
|
||||
BITCOUNT=122
|
||||
SHAPE=123
|
||||
BAND=124
|
||||
XOR=125
|
||||
BOR=126
|
||||
TENSOR=127
|
||||
ADD_KEY=128
|
||||
REMOVE_KEY=129
|
||||
PUSH=130
|
||||
POP=131
|
||||
CLEAR=132
|
||||
HAS=133
|
||||
GET=134
|
||||
CONCAT=135
|
||||
STACK=136
|
||||
NONZERO=137
|
||||
INT=138
|
||||
FLOAT=139
|
||||
UPPER=140
|
||||
LOWER=141
|
||||
TRIM=142
|
||||
SPLIT=143
|
||||
JOIN=144
|
||||
SUBSTRING=145
|
||||
FIND=146
|
||||
REPLACE=147
|
||||
DILATE=148
|
||||
ERODE=149
|
||||
MORPH_OPEN=150
|
||||
MORPH_CLOSE=151
|
||||
RGB_TO_OKLAB=152
|
||||
RGB_TO_CIELAB=153
|
||||
OKLAB_TO_RGB=154
|
||||
CIELAB_TO_RGB=155
|
||||
RGB_TO_HSV=156
|
||||
HSV_TO_RGB=157
|
||||
INT_TO_RGB=158
|
||||
RGB_TO_INT=159
|
||||
INTERPOLATE_LINEAR=160
|
||||
INTERPOLATE_AREA=161
|
||||
INTERPOLATE_NEAREST=162
|
||||
TEXT_IMAGE=163
|
||||
AS_NESTED=164
|
||||
SVD=165
|
||||
DIAG=166
|
||||
IF=167
|
||||
ELSE=168
|
||||
WHILE=169
|
||||
FOR=170
|
||||
IN=171
|
||||
BREAK=172
|
||||
CONTINUE=173
|
||||
RETURN=174
|
||||
TIMESTAMP=175
|
||||
SORT=176
|
||||
ARGSORT=177
|
||||
ARGMIN=178
|
||||
ARGMAX=179
|
||||
SOFTMAX=180
|
||||
SOFTMIN=181
|
||||
UNIQUE=182
|
||||
FLIP=183
|
||||
STARTSWITH=184
|
||||
ENDSWITH=185
|
||||
SQUEEZE=186
|
||||
UNSQUEEZE=187
|
||||
ROLL=188
|
||||
COV=189
|
||||
CORR=190
|
||||
ENTROPY=191
|
||||
CROP=192
|
||||
NONE=193
|
||||
COORDS=194
|
||||
GATHER=195
|
||||
SCATTER=196
|
||||
SCATTER_ADD=197
|
||||
NOISE=198
|
||||
RAND=199
|
||||
CAUCHY=200
|
||||
EXPONENTIAL=201
|
||||
LOGNORMAL=202
|
||||
BERNOULLI=203
|
||||
POISSON=204
|
||||
GAMMADIST=205
|
||||
BETADIST=206
|
||||
LAPLACEDIST=207
|
||||
GUMBELDIST=208
|
||||
WEIBULLDIST=209
|
||||
CHI2DIST=210
|
||||
STUDENTTDIST=211
|
||||
PERLIN=212
|
||||
CELLULAR=213
|
||||
PLASMA=214
|
||||
RIDGED=215
|
||||
DOMAIN_WARP=216
|
||||
PLUS=217
|
||||
MINUS=218
|
||||
MULT=219
|
||||
DIV=220
|
||||
MOD=221
|
||||
POW=222
|
||||
LSHIFT=223
|
||||
RSHIFT=224
|
||||
GE=225
|
||||
GT=226
|
||||
LE=227
|
||||
LT=228
|
||||
EQ=229
|
||||
EQUEALS=230
|
||||
PLUS_EQ=231
|
||||
MINUS_EQ=232
|
||||
MULT_EQ=233
|
||||
DIV_EQ=234
|
||||
MOD_EQ=235
|
||||
NE=236
|
||||
PIPE=237
|
||||
LPAREN=238
|
||||
RPAREN=239
|
||||
COMMA=240
|
||||
SEMICOLON=241
|
||||
ARROW=242
|
||||
LBRACKET=243
|
||||
RBRACKET=244
|
||||
QUESTION=245
|
||||
COLON=246
|
||||
LBRACE=247
|
||||
RBRACE=248
|
||||
NUMBER=249
|
||||
CONSTANT=250
|
||||
STRING=251
|
||||
VARIABLE=252
|
||||
SL_COMMENT=253
|
||||
ML_COMMENT=254
|
||||
WS=255
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -263,161 +271,169 @@ WS=247
|
||||
'ln'=16
|
||||
'log'=17
|
||||
'exp'=18
|
||||
'smin'=19
|
||||
'smax'=20
|
||||
'tmin'=21
|
||||
'tmax'=22
|
||||
'tnorm'=23
|
||||
'snorm'=24
|
||||
'floor'=25
|
||||
'ceil'=26
|
||||
'round'=27
|
||||
'gamma'=28
|
||||
'pow'=29
|
||||
'sigm'=30
|
||||
'clamp'=31
|
||||
'fft'=32
|
||||
'ifft'=33
|
||||
'angle'=34
|
||||
'print'=35
|
||||
'lerp'=38
|
||||
'step'=39
|
||||
'smoothstep'=40
|
||||
'fract'=41
|
||||
'relu'=42
|
||||
'softplus'=43
|
||||
'gelu'=44
|
||||
'sign'=45
|
||||
'map'=46
|
||||
'swap'=49
|
||||
'range'=53
|
||||
'linspace'=54
|
||||
'logspace'=55
|
||||
'topk'=56
|
||||
'botk'=57
|
||||
'pinv'=58
|
||||
'sum'=59
|
||||
'mean'=60
|
||||
'std'=61
|
||||
'var'=62
|
||||
'quantile'=65
|
||||
'dot'=66
|
||||
'moment'=67
|
||||
'erf'=68
|
||||
'erfinv'=69
|
||||
'any'=70
|
||||
'all'=71
|
||||
'edge'=72
|
||||
'median'=74
|
||||
'mode'=75
|
||||
'cumsum'=76
|
||||
'cumprod'=77
|
||||
'smootherstep'=83
|
||||
'remap'=85
|
||||
'keys'=88
|
||||
'repeat'=96
|
||||
'flatten'=97
|
||||
'append'=98
|
||||
'get_value'=99
|
||||
'flow_apply'=100
|
||||
'motion_mask'=102
|
||||
'flow_to_image'=103
|
||||
'where'=106
|
||||
'overlay'=108
|
||||
'pad'=109
|
||||
'cross'=110
|
||||
'matmul'=111
|
||||
'rife'=112
|
||||
'shape'=115
|
||||
'tensor'=119
|
||||
'add_key'=120
|
||||
'stack_push'=122
|
||||
'stack_pop'=123
|
||||
'stack_clear'=124
|
||||
'stack_has'=125
|
||||
'stack_get'=126
|
||||
'stack'=128
|
||||
'nonzero'=129
|
||||
'int'=130
|
||||
'float'=131
|
||||
'upper'=132
|
||||
'lower'=133
|
||||
'trim'=134
|
||||
'split'=135
|
||||
'join'=136
|
||||
'find'=138
|
||||
'replace'=139
|
||||
'dilate'=140
|
||||
'erode'=141
|
||||
'morph_open'=142
|
||||
'morph_close'=143
|
||||
'rgb_to_oklab'=144
|
||||
'rgb_to_cielab'=145
|
||||
'oklab_to_rgb'=146
|
||||
'cielab_to_rgb'=147
|
||||
'rgb_to_hsv'=148
|
||||
'hsv_to_rgb'=149
|
||||
'int_to_rgb'=150
|
||||
'rgb_to_int'=151
|
||||
'interpolate_linear'=152
|
||||
'interpolate_area'=153
|
||||
'text_image'=155
|
||||
'if'=159
|
||||
'else'=160
|
||||
'while'=161
|
||||
'for'=162
|
||||
'in'=163
|
||||
'break'=164
|
||||
'continue'=165
|
||||
'return'=166
|
||||
'sort'=168
|
||||
'argsort'=169
|
||||
'argmin'=170
|
||||
'argmax'=171
|
||||
'softmax'=172
|
||||
'softmin'=173
|
||||
'unique'=174
|
||||
'flip'=175
|
||||
'startswith'=176
|
||||
'endswith'=177
|
||||
'squeeze'=178
|
||||
'unsqueeze'=179
|
||||
'roll'=180
|
||||
'cov'=181
|
||||
'entropy'=183
|
||||
'crop'=184
|
||||
'gather'=187
|
||||
'scatter'=188
|
||||
'scatter_add'=189
|
||||
'+'=209
|
||||
'-'=210
|
||||
'*'=211
|
||||
'/'=212
|
||||
'%'=213
|
||||
'^'=214
|
||||
'<<'=215
|
||||
'>>'=216
|
||||
'>='=217
|
||||
'>'=218
|
||||
'<='=219
|
||||
'<'=220
|
||||
'=='=221
|
||||
'='=222
|
||||
'+='=223
|
||||
'-='=224
|
||||
'*='=225
|
||||
'/='=226
|
||||
'%='=227
|
||||
'!='=228
|
||||
'|'=229
|
||||
'('=230
|
||||
')'=231
|
||||
','=232
|
||||
';'=233
|
||||
'->'=234
|
||||
'['=235
|
||||
']'=236
|
||||
'?'=237
|
||||
':'=238
|
||||
'{'=239
|
||||
'}'=240
|
||||
'log1p'=19
|
||||
'expm1'=20
|
||||
'isnan'=21
|
||||
'isinf'=22
|
||||
'isfinite'=23
|
||||
'smin'=24
|
||||
'smax'=25
|
||||
'tmin'=26
|
||||
'tmax'=27
|
||||
'tnorm'=28
|
||||
'snorm'=29
|
||||
'floor'=30
|
||||
'ceil'=31
|
||||
'round'=32
|
||||
'gamma'=33
|
||||
'pow'=34
|
||||
'sigm'=35
|
||||
'clamp'=36
|
||||
'fft'=37
|
||||
'ifft'=38
|
||||
'angle'=39
|
||||
'print'=40
|
||||
'lerp'=43
|
||||
'step'=44
|
||||
'smoothstep'=45
|
||||
'fract'=46
|
||||
'relu'=47
|
||||
'softplus'=48
|
||||
'gelu'=49
|
||||
'sign'=50
|
||||
'map'=51
|
||||
'swap'=54
|
||||
'range'=58
|
||||
'linspace'=59
|
||||
'logspace'=60
|
||||
'topk'=61
|
||||
'botk'=62
|
||||
'pinv'=63
|
||||
'sum'=64
|
||||
'mean'=65
|
||||
'std'=66
|
||||
'var'=67
|
||||
'prod'=68
|
||||
'isclose'=69
|
||||
'allclose'=70
|
||||
'quantile'=73
|
||||
'dot'=74
|
||||
'moment'=75
|
||||
'erf'=76
|
||||
'erfinv'=77
|
||||
'any'=78
|
||||
'all'=79
|
||||
'edge'=80
|
||||
'median'=82
|
||||
'mode'=83
|
||||
'cumsum'=84
|
||||
'cumprod'=85
|
||||
'smootherstep'=91
|
||||
'remap'=93
|
||||
'keys'=96
|
||||
'repeat'=104
|
||||
'flatten'=105
|
||||
'append'=106
|
||||
'get_value'=107
|
||||
'flow_apply'=108
|
||||
'motion_mask'=110
|
||||
'flow_to_image'=111
|
||||
'where'=114
|
||||
'overlay'=116
|
||||
'pad'=117
|
||||
'cross'=118
|
||||
'matmul'=119
|
||||
'rife'=120
|
||||
'shape'=123
|
||||
'tensor'=127
|
||||
'add_key'=128
|
||||
'stack_push'=130
|
||||
'stack_pop'=131
|
||||
'stack_clear'=132
|
||||
'stack_has'=133
|
||||
'stack_get'=134
|
||||
'stack'=136
|
||||
'nonzero'=137
|
||||
'int'=138
|
||||
'float'=139
|
||||
'upper'=140
|
||||
'lower'=141
|
||||
'trim'=142
|
||||
'split'=143
|
||||
'join'=144
|
||||
'find'=146
|
||||
'replace'=147
|
||||
'dilate'=148
|
||||
'erode'=149
|
||||
'morph_open'=150
|
||||
'morph_close'=151
|
||||
'rgb_to_oklab'=152
|
||||
'rgb_to_cielab'=153
|
||||
'oklab_to_rgb'=154
|
||||
'cielab_to_rgb'=155
|
||||
'rgb_to_hsv'=156
|
||||
'hsv_to_rgb'=157
|
||||
'int_to_rgb'=158
|
||||
'rgb_to_int'=159
|
||||
'interpolate_linear'=160
|
||||
'interpolate_area'=161
|
||||
'text_image'=163
|
||||
'if'=167
|
||||
'else'=168
|
||||
'while'=169
|
||||
'for'=170
|
||||
'in'=171
|
||||
'break'=172
|
||||
'continue'=173
|
||||
'return'=174
|
||||
'sort'=176
|
||||
'argsort'=177
|
||||
'argmin'=178
|
||||
'argmax'=179
|
||||
'softmax'=180
|
||||
'softmin'=181
|
||||
'unique'=182
|
||||
'flip'=183
|
||||
'startswith'=184
|
||||
'endswith'=185
|
||||
'squeeze'=186
|
||||
'unsqueeze'=187
|
||||
'roll'=188
|
||||
'cov'=189
|
||||
'entropy'=191
|
||||
'crop'=192
|
||||
'gather'=195
|
||||
'scatter'=196
|
||||
'scatter_add'=197
|
||||
'+'=217
|
||||
'-'=218
|
||||
'*'=219
|
||||
'/'=220
|
||||
'%'=221
|
||||
'^'=222
|
||||
'<<'=223
|
||||
'>>'=224
|
||||
'>='=225
|
||||
'>'=226
|
||||
'<='=227
|
||||
'<'=228
|
||||
'=='=229
|
||||
'='=230
|
||||
'+='=231
|
||||
'-='=232
|
||||
'*='=233
|
||||
'/='=234
|
||||
'%='=235
|
||||
'!='=236
|
||||
'|'=237
|
||||
'('=238
|
||||
')'=239
|
||||
','=240
|
||||
';'=241
|
||||
'->'=242
|
||||
'['=243
|
||||
']'=244
|
||||
'?'=245
|
||||
':'=246
|
||||
'{'=247
|
||||
'}'=248
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1660
-1611
File diff suppressed because it is too large
Load Diff
@@ -16,235 +16,243 @@ SQRT=15
|
||||
LN=16
|
||||
LOG=17
|
||||
EXP=18
|
||||
SMIN=19
|
||||
SMAX=20
|
||||
TMIN=21
|
||||
TMAX=22
|
||||
TNORM=23
|
||||
SNORM=24
|
||||
FLOOR=25
|
||||
CEIL=26
|
||||
ROUND=27
|
||||
GAMMA=28
|
||||
POWE=29
|
||||
SIGM=30
|
||||
CLAMP=31
|
||||
SFFT=32
|
||||
SIFFT=33
|
||||
ANGL=34
|
||||
PRNT=35
|
||||
PRINT_SHAPE=36
|
||||
NVL=37
|
||||
LERP=38
|
||||
STEP=39
|
||||
SMOOTHSTEP=40
|
||||
FRACT=41
|
||||
RELU=42
|
||||
SOFTPLUS=43
|
||||
GELU=44
|
||||
SIGN=45
|
||||
MAP=46
|
||||
EZCONV=47
|
||||
CONV=48
|
||||
SWAP=49
|
||||
TRANSPOSE=50
|
||||
PERM=51
|
||||
RESHAPE=52
|
||||
RANGE=53
|
||||
LINSPACE=54
|
||||
LOGSPACE=55
|
||||
TOPK=56
|
||||
BOTK=57
|
||||
PINV=58
|
||||
SUM=59
|
||||
MEAN=60
|
||||
STD=61
|
||||
VAR=62
|
||||
QUARTILE=63
|
||||
PERCENTILE=64
|
||||
QUANTILE=65
|
||||
DOT=66
|
||||
MOMENT=67
|
||||
ERF=68
|
||||
ERFINV=69
|
||||
ANY=70
|
||||
ALL=71
|
||||
EDGE=72
|
||||
GAUSSIAN=73
|
||||
MEDIAN=74
|
||||
MODE=75
|
||||
CUMSUM=76
|
||||
CUMPROD=77
|
||||
TOPK_IND=78
|
||||
BOTK_IND=79
|
||||
CUBIC_EASE=80
|
||||
ELASTIC_EASE=81
|
||||
SINE_EASE=82
|
||||
SMOOTHERSTEP=83
|
||||
DIST=84
|
||||
REMAP=85
|
||||
COSSIM=86
|
||||
COUNT=87
|
||||
KEYS=88
|
||||
ENABLE_TRACKING=89
|
||||
DISABLE_TRACKING=90
|
||||
RESET_TRACKING=91
|
||||
GET_CHANGED_KEYS=92
|
||||
GET_ADDED_KEYS=93
|
||||
GET_REMOVED_KEYS=94
|
||||
GET_UNCHANGED_KEYS=95
|
||||
REPEAT=96
|
||||
FLATTEN=97
|
||||
APPEND=98
|
||||
GET_VALUE=99
|
||||
FLOW_APPLY=100
|
||||
BATCH_SHUFFLE=101
|
||||
MOTION_MASK=102
|
||||
FLOW_TO_IMAGE=103
|
||||
FLOW_MAG=104
|
||||
FLOW_ANG=105
|
||||
WHERE=106
|
||||
HISTOGRAM=107
|
||||
OVERLAY=108
|
||||
PAD=109
|
||||
CROSS=110
|
||||
MATMUL=111
|
||||
RIFE=112
|
||||
BNOT=113
|
||||
BITCOUNT=114
|
||||
SHAPE=115
|
||||
BAND=116
|
||||
XOR=117
|
||||
BOR=118
|
||||
TENSOR=119
|
||||
ADD_KEY=120
|
||||
REMOVE_KEY=121
|
||||
PUSH=122
|
||||
POP=123
|
||||
CLEAR=124
|
||||
HAS=125
|
||||
GET=126
|
||||
CONCAT=127
|
||||
STACK=128
|
||||
NONZERO=129
|
||||
INT=130
|
||||
FLOAT=131
|
||||
UPPER=132
|
||||
LOWER=133
|
||||
TRIM=134
|
||||
SPLIT=135
|
||||
JOIN=136
|
||||
SUBSTRING=137
|
||||
FIND=138
|
||||
REPLACE=139
|
||||
DILATE=140
|
||||
ERODE=141
|
||||
MORPH_OPEN=142
|
||||
MORPH_CLOSE=143
|
||||
RGB_TO_OKLAB=144
|
||||
RGB_TO_CIELAB=145
|
||||
OKLAB_TO_RGB=146
|
||||
CIELAB_TO_RGB=147
|
||||
RGB_TO_HSV=148
|
||||
HSV_TO_RGB=149
|
||||
INT_TO_RGB=150
|
||||
RGB_TO_INT=151
|
||||
INTERPOLATE_LINEAR=152
|
||||
INTERPOLATE_AREA=153
|
||||
INTERPOLATE_NEAREST=154
|
||||
TEXT_IMAGE=155
|
||||
AS_NESTED=156
|
||||
SVD=157
|
||||
DIAG=158
|
||||
IF=159
|
||||
ELSE=160
|
||||
WHILE=161
|
||||
FOR=162
|
||||
IN=163
|
||||
BREAK=164
|
||||
CONTINUE=165
|
||||
RETURN=166
|
||||
TIMESTAMP=167
|
||||
SORT=168
|
||||
ARGSORT=169
|
||||
ARGMIN=170
|
||||
ARGMAX=171
|
||||
SOFTMAX=172
|
||||
SOFTMIN=173
|
||||
UNIQUE=174
|
||||
FLIP=175
|
||||
STARTSWITH=176
|
||||
ENDSWITH=177
|
||||
SQUEEZE=178
|
||||
UNSQUEEZE=179
|
||||
ROLL=180
|
||||
COV=181
|
||||
CORR=182
|
||||
ENTROPY=183
|
||||
CROP=184
|
||||
NONE=185
|
||||
COORDS=186
|
||||
GATHER=187
|
||||
SCATTER=188
|
||||
SCATTER_ADD=189
|
||||
NOISE=190
|
||||
RAND=191
|
||||
CAUCHY=192
|
||||
EXPONENTIAL=193
|
||||
LOGNORMAL=194
|
||||
BERNOULLI=195
|
||||
POISSON=196
|
||||
GAMMADIST=197
|
||||
BETADIST=198
|
||||
LAPLACEDIST=199
|
||||
GUMBELDIST=200
|
||||
WEIBULLDIST=201
|
||||
CHI2DIST=202
|
||||
STUDENTTDIST=203
|
||||
PERLIN=204
|
||||
CELLULAR=205
|
||||
PLASMA=206
|
||||
RIDGED=207
|
||||
DOMAIN_WARP=208
|
||||
PLUS=209
|
||||
MINUS=210
|
||||
MULT=211
|
||||
DIV=212
|
||||
MOD=213
|
||||
POW=214
|
||||
LSHIFT=215
|
||||
RSHIFT=216
|
||||
GE=217
|
||||
GT=218
|
||||
LE=219
|
||||
LT=220
|
||||
EQ=221
|
||||
EQUEALS=222
|
||||
PLUS_EQ=223
|
||||
MINUS_EQ=224
|
||||
MULT_EQ=225
|
||||
DIV_EQ=226
|
||||
MOD_EQ=227
|
||||
NE=228
|
||||
PIPE=229
|
||||
LPAREN=230
|
||||
RPAREN=231
|
||||
COMMA=232
|
||||
SEMICOLON=233
|
||||
ARROW=234
|
||||
LBRACKET=235
|
||||
RBRACKET=236
|
||||
QUESTION=237
|
||||
COLON=238
|
||||
LBRACE=239
|
||||
RBRACE=240
|
||||
NUMBER=241
|
||||
CONSTANT=242
|
||||
STRING=243
|
||||
VARIABLE=244
|
||||
SL_COMMENT=245
|
||||
ML_COMMENT=246
|
||||
WS=247
|
||||
LOG1P=19
|
||||
EXPM1=20
|
||||
ISNAN=21
|
||||
ISINF=22
|
||||
ISFINITE=23
|
||||
SMIN=24
|
||||
SMAX=25
|
||||
TMIN=26
|
||||
TMAX=27
|
||||
TNORM=28
|
||||
SNORM=29
|
||||
FLOOR=30
|
||||
CEIL=31
|
||||
ROUND=32
|
||||
GAMMA=33
|
||||
POWE=34
|
||||
SIGM=35
|
||||
CLAMP=36
|
||||
SFFT=37
|
||||
SIFFT=38
|
||||
ANGL=39
|
||||
PRNT=40
|
||||
PRINT_SHAPE=41
|
||||
NVL=42
|
||||
LERP=43
|
||||
STEP=44
|
||||
SMOOTHSTEP=45
|
||||
FRACT=46
|
||||
RELU=47
|
||||
SOFTPLUS=48
|
||||
GELU=49
|
||||
SIGN=50
|
||||
MAP=51
|
||||
EZCONV=52
|
||||
CONV=53
|
||||
SWAP=54
|
||||
TRANSPOSE=55
|
||||
PERM=56
|
||||
RESHAPE=57
|
||||
RANGE=58
|
||||
LINSPACE=59
|
||||
LOGSPACE=60
|
||||
TOPK=61
|
||||
BOTK=62
|
||||
PINV=63
|
||||
SUM=64
|
||||
MEAN=65
|
||||
STD=66
|
||||
VAR=67
|
||||
PROD=68
|
||||
ISCLOSE=69
|
||||
ALLCLOSE=70
|
||||
QUARTILE=71
|
||||
PERCENTILE=72
|
||||
QUANTILE=73
|
||||
DOT=74
|
||||
MOMENT=75
|
||||
ERF=76
|
||||
ERFINV=77
|
||||
ANY=78
|
||||
ALL=79
|
||||
EDGE=80
|
||||
GAUSSIAN=81
|
||||
MEDIAN=82
|
||||
MODE=83
|
||||
CUMSUM=84
|
||||
CUMPROD=85
|
||||
TOPK_IND=86
|
||||
BOTK_IND=87
|
||||
CUBIC_EASE=88
|
||||
ELASTIC_EASE=89
|
||||
SINE_EASE=90
|
||||
SMOOTHERSTEP=91
|
||||
DIST=92
|
||||
REMAP=93
|
||||
COSSIM=94
|
||||
COUNT=95
|
||||
KEYS=96
|
||||
ENABLE_TRACKING=97
|
||||
DISABLE_TRACKING=98
|
||||
RESET_TRACKING=99
|
||||
GET_CHANGED_KEYS=100
|
||||
GET_ADDED_KEYS=101
|
||||
GET_REMOVED_KEYS=102
|
||||
GET_UNCHANGED_KEYS=103
|
||||
REPEAT=104
|
||||
FLATTEN=105
|
||||
APPEND=106
|
||||
GET_VALUE=107
|
||||
FLOW_APPLY=108
|
||||
BATCH_SHUFFLE=109
|
||||
MOTION_MASK=110
|
||||
FLOW_TO_IMAGE=111
|
||||
FLOW_MAG=112
|
||||
FLOW_ANG=113
|
||||
WHERE=114
|
||||
HISTOGRAM=115
|
||||
OVERLAY=116
|
||||
PAD=117
|
||||
CROSS=118
|
||||
MATMUL=119
|
||||
RIFE=120
|
||||
BNOT=121
|
||||
BITCOUNT=122
|
||||
SHAPE=123
|
||||
BAND=124
|
||||
XOR=125
|
||||
BOR=126
|
||||
TENSOR=127
|
||||
ADD_KEY=128
|
||||
REMOVE_KEY=129
|
||||
PUSH=130
|
||||
POP=131
|
||||
CLEAR=132
|
||||
HAS=133
|
||||
GET=134
|
||||
CONCAT=135
|
||||
STACK=136
|
||||
NONZERO=137
|
||||
INT=138
|
||||
FLOAT=139
|
||||
UPPER=140
|
||||
LOWER=141
|
||||
TRIM=142
|
||||
SPLIT=143
|
||||
JOIN=144
|
||||
SUBSTRING=145
|
||||
FIND=146
|
||||
REPLACE=147
|
||||
DILATE=148
|
||||
ERODE=149
|
||||
MORPH_OPEN=150
|
||||
MORPH_CLOSE=151
|
||||
RGB_TO_OKLAB=152
|
||||
RGB_TO_CIELAB=153
|
||||
OKLAB_TO_RGB=154
|
||||
CIELAB_TO_RGB=155
|
||||
RGB_TO_HSV=156
|
||||
HSV_TO_RGB=157
|
||||
INT_TO_RGB=158
|
||||
RGB_TO_INT=159
|
||||
INTERPOLATE_LINEAR=160
|
||||
INTERPOLATE_AREA=161
|
||||
INTERPOLATE_NEAREST=162
|
||||
TEXT_IMAGE=163
|
||||
AS_NESTED=164
|
||||
SVD=165
|
||||
DIAG=166
|
||||
IF=167
|
||||
ELSE=168
|
||||
WHILE=169
|
||||
FOR=170
|
||||
IN=171
|
||||
BREAK=172
|
||||
CONTINUE=173
|
||||
RETURN=174
|
||||
TIMESTAMP=175
|
||||
SORT=176
|
||||
ARGSORT=177
|
||||
ARGMIN=178
|
||||
ARGMAX=179
|
||||
SOFTMAX=180
|
||||
SOFTMIN=181
|
||||
UNIQUE=182
|
||||
FLIP=183
|
||||
STARTSWITH=184
|
||||
ENDSWITH=185
|
||||
SQUEEZE=186
|
||||
UNSQUEEZE=187
|
||||
ROLL=188
|
||||
COV=189
|
||||
CORR=190
|
||||
ENTROPY=191
|
||||
CROP=192
|
||||
NONE=193
|
||||
COORDS=194
|
||||
GATHER=195
|
||||
SCATTER=196
|
||||
SCATTER_ADD=197
|
||||
NOISE=198
|
||||
RAND=199
|
||||
CAUCHY=200
|
||||
EXPONENTIAL=201
|
||||
LOGNORMAL=202
|
||||
BERNOULLI=203
|
||||
POISSON=204
|
||||
GAMMADIST=205
|
||||
BETADIST=206
|
||||
LAPLACEDIST=207
|
||||
GUMBELDIST=208
|
||||
WEIBULLDIST=209
|
||||
CHI2DIST=210
|
||||
STUDENTTDIST=211
|
||||
PERLIN=212
|
||||
CELLULAR=213
|
||||
PLASMA=214
|
||||
RIDGED=215
|
||||
DOMAIN_WARP=216
|
||||
PLUS=217
|
||||
MINUS=218
|
||||
MULT=219
|
||||
DIV=220
|
||||
MOD=221
|
||||
POW=222
|
||||
LSHIFT=223
|
||||
RSHIFT=224
|
||||
GE=225
|
||||
GT=226
|
||||
LE=227
|
||||
LT=228
|
||||
EQ=229
|
||||
EQUEALS=230
|
||||
PLUS_EQ=231
|
||||
MINUS_EQ=232
|
||||
MULT_EQ=233
|
||||
DIV_EQ=234
|
||||
MOD_EQ=235
|
||||
NE=236
|
||||
PIPE=237
|
||||
LPAREN=238
|
||||
RPAREN=239
|
||||
COMMA=240
|
||||
SEMICOLON=241
|
||||
ARROW=242
|
||||
LBRACKET=243
|
||||
RBRACKET=244
|
||||
QUESTION=245
|
||||
COLON=246
|
||||
LBRACE=247
|
||||
RBRACE=248
|
||||
NUMBER=249
|
||||
CONSTANT=250
|
||||
STRING=251
|
||||
VARIABLE=252
|
||||
SL_COMMENT=253
|
||||
ML_COMMENT=254
|
||||
WS=255
|
||||
'sin'=1
|
||||
'cos'=2
|
||||
'tan'=3
|
||||
@@ -263,161 +271,169 @@ WS=247
|
||||
'ln'=16
|
||||
'log'=17
|
||||
'exp'=18
|
||||
'smin'=19
|
||||
'smax'=20
|
||||
'tmin'=21
|
||||
'tmax'=22
|
||||
'tnorm'=23
|
||||
'snorm'=24
|
||||
'floor'=25
|
||||
'ceil'=26
|
||||
'round'=27
|
||||
'gamma'=28
|
||||
'pow'=29
|
||||
'sigm'=30
|
||||
'clamp'=31
|
||||
'fft'=32
|
||||
'ifft'=33
|
||||
'angle'=34
|
||||
'print'=35
|
||||
'lerp'=38
|
||||
'step'=39
|
||||
'smoothstep'=40
|
||||
'fract'=41
|
||||
'relu'=42
|
||||
'softplus'=43
|
||||
'gelu'=44
|
||||
'sign'=45
|
||||
'map'=46
|
||||
'swap'=49
|
||||
'range'=53
|
||||
'linspace'=54
|
||||
'logspace'=55
|
||||
'topk'=56
|
||||
'botk'=57
|
||||
'pinv'=58
|
||||
'sum'=59
|
||||
'mean'=60
|
||||
'std'=61
|
||||
'var'=62
|
||||
'quantile'=65
|
||||
'dot'=66
|
||||
'moment'=67
|
||||
'erf'=68
|
||||
'erfinv'=69
|
||||
'any'=70
|
||||
'all'=71
|
||||
'edge'=72
|
||||
'median'=74
|
||||
'mode'=75
|
||||
'cumsum'=76
|
||||
'cumprod'=77
|
||||
'smootherstep'=83
|
||||
'remap'=85
|
||||
'keys'=88
|
||||
'repeat'=96
|
||||
'flatten'=97
|
||||
'append'=98
|
||||
'get_value'=99
|
||||
'flow_apply'=100
|
||||
'motion_mask'=102
|
||||
'flow_to_image'=103
|
||||
'where'=106
|
||||
'overlay'=108
|
||||
'pad'=109
|
||||
'cross'=110
|
||||
'matmul'=111
|
||||
'rife'=112
|
||||
'shape'=115
|
||||
'tensor'=119
|
||||
'add_key'=120
|
||||
'stack_push'=122
|
||||
'stack_pop'=123
|
||||
'stack_clear'=124
|
||||
'stack_has'=125
|
||||
'stack_get'=126
|
||||
'stack'=128
|
||||
'nonzero'=129
|
||||
'int'=130
|
||||
'float'=131
|
||||
'upper'=132
|
||||
'lower'=133
|
||||
'trim'=134
|
||||
'split'=135
|
||||
'join'=136
|
||||
'find'=138
|
||||
'replace'=139
|
||||
'dilate'=140
|
||||
'erode'=141
|
||||
'morph_open'=142
|
||||
'morph_close'=143
|
||||
'rgb_to_oklab'=144
|
||||
'rgb_to_cielab'=145
|
||||
'oklab_to_rgb'=146
|
||||
'cielab_to_rgb'=147
|
||||
'rgb_to_hsv'=148
|
||||
'hsv_to_rgb'=149
|
||||
'int_to_rgb'=150
|
||||
'rgb_to_int'=151
|
||||
'interpolate_linear'=152
|
||||
'interpolate_area'=153
|
||||
'text_image'=155
|
||||
'if'=159
|
||||
'else'=160
|
||||
'while'=161
|
||||
'for'=162
|
||||
'in'=163
|
||||
'break'=164
|
||||
'continue'=165
|
||||
'return'=166
|
||||
'sort'=168
|
||||
'argsort'=169
|
||||
'argmin'=170
|
||||
'argmax'=171
|
||||
'softmax'=172
|
||||
'softmin'=173
|
||||
'unique'=174
|
||||
'flip'=175
|
||||
'startswith'=176
|
||||
'endswith'=177
|
||||
'squeeze'=178
|
||||
'unsqueeze'=179
|
||||
'roll'=180
|
||||
'cov'=181
|
||||
'entropy'=183
|
||||
'crop'=184
|
||||
'gather'=187
|
||||
'scatter'=188
|
||||
'scatter_add'=189
|
||||
'+'=209
|
||||
'-'=210
|
||||
'*'=211
|
||||
'/'=212
|
||||
'%'=213
|
||||
'^'=214
|
||||
'<<'=215
|
||||
'>>'=216
|
||||
'>='=217
|
||||
'>'=218
|
||||
'<='=219
|
||||
'<'=220
|
||||
'=='=221
|
||||
'='=222
|
||||
'+='=223
|
||||
'-='=224
|
||||
'*='=225
|
||||
'/='=226
|
||||
'%='=227
|
||||
'!='=228
|
||||
'|'=229
|
||||
'('=230
|
||||
')'=231
|
||||
','=232
|
||||
';'=233
|
||||
'->'=234
|
||||
'['=235
|
||||
']'=236
|
||||
'?'=237
|
||||
':'=238
|
||||
'{'=239
|
||||
'}'=240
|
||||
'log1p'=19
|
||||
'expm1'=20
|
||||
'isnan'=21
|
||||
'isinf'=22
|
||||
'isfinite'=23
|
||||
'smin'=24
|
||||
'smax'=25
|
||||
'tmin'=26
|
||||
'tmax'=27
|
||||
'tnorm'=28
|
||||
'snorm'=29
|
||||
'floor'=30
|
||||
'ceil'=31
|
||||
'round'=32
|
||||
'gamma'=33
|
||||
'pow'=34
|
||||
'sigm'=35
|
||||
'clamp'=36
|
||||
'fft'=37
|
||||
'ifft'=38
|
||||
'angle'=39
|
||||
'print'=40
|
||||
'lerp'=43
|
||||
'step'=44
|
||||
'smoothstep'=45
|
||||
'fract'=46
|
||||
'relu'=47
|
||||
'softplus'=48
|
||||
'gelu'=49
|
||||
'sign'=50
|
||||
'map'=51
|
||||
'swap'=54
|
||||
'range'=58
|
||||
'linspace'=59
|
||||
'logspace'=60
|
||||
'topk'=61
|
||||
'botk'=62
|
||||
'pinv'=63
|
||||
'sum'=64
|
||||
'mean'=65
|
||||
'std'=66
|
||||
'var'=67
|
||||
'prod'=68
|
||||
'isclose'=69
|
||||
'allclose'=70
|
||||
'quantile'=73
|
||||
'dot'=74
|
||||
'moment'=75
|
||||
'erf'=76
|
||||
'erfinv'=77
|
||||
'any'=78
|
||||
'all'=79
|
||||
'edge'=80
|
||||
'median'=82
|
||||
'mode'=83
|
||||
'cumsum'=84
|
||||
'cumprod'=85
|
||||
'smootherstep'=91
|
||||
'remap'=93
|
||||
'keys'=96
|
||||
'repeat'=104
|
||||
'flatten'=105
|
||||
'append'=106
|
||||
'get_value'=107
|
||||
'flow_apply'=108
|
||||
'motion_mask'=110
|
||||
'flow_to_image'=111
|
||||
'where'=114
|
||||
'overlay'=116
|
||||
'pad'=117
|
||||
'cross'=118
|
||||
'matmul'=119
|
||||
'rife'=120
|
||||
'shape'=123
|
||||
'tensor'=127
|
||||
'add_key'=128
|
||||
'stack_push'=130
|
||||
'stack_pop'=131
|
||||
'stack_clear'=132
|
||||
'stack_has'=133
|
||||
'stack_get'=134
|
||||
'stack'=136
|
||||
'nonzero'=137
|
||||
'int'=138
|
||||
'float'=139
|
||||
'upper'=140
|
||||
'lower'=141
|
||||
'trim'=142
|
||||
'split'=143
|
||||
'join'=144
|
||||
'find'=146
|
||||
'replace'=147
|
||||
'dilate'=148
|
||||
'erode'=149
|
||||
'morph_open'=150
|
||||
'morph_close'=151
|
||||
'rgb_to_oklab'=152
|
||||
'rgb_to_cielab'=153
|
||||
'oklab_to_rgb'=154
|
||||
'cielab_to_rgb'=155
|
||||
'rgb_to_hsv'=156
|
||||
'hsv_to_rgb'=157
|
||||
'int_to_rgb'=158
|
||||
'rgb_to_int'=159
|
||||
'interpolate_linear'=160
|
||||
'interpolate_area'=161
|
||||
'text_image'=163
|
||||
'if'=167
|
||||
'else'=168
|
||||
'while'=169
|
||||
'for'=170
|
||||
'in'=171
|
||||
'break'=172
|
||||
'continue'=173
|
||||
'return'=174
|
||||
'sort'=176
|
||||
'argsort'=177
|
||||
'argmin'=178
|
||||
'argmax'=179
|
||||
'softmax'=180
|
||||
'softmin'=181
|
||||
'unique'=182
|
||||
'flip'=183
|
||||
'startswith'=184
|
||||
'endswith'=185
|
||||
'squeeze'=186
|
||||
'unsqueeze'=187
|
||||
'roll'=188
|
||||
'cov'=189
|
||||
'entropy'=191
|
||||
'crop'=192
|
||||
'gather'=195
|
||||
'scatter'=196
|
||||
'scatter_add'=197
|
||||
'+'=217
|
||||
'-'=218
|
||||
'*'=219
|
||||
'/'=220
|
||||
'%'=221
|
||||
'^'=222
|
||||
'<<'=223
|
||||
'>>'=224
|
||||
'>='=225
|
||||
'>'=226
|
||||
'<='=227
|
||||
'<'=228
|
||||
'=='=229
|
||||
'='=230
|
||||
'+='=231
|
||||
'-='=232
|
||||
'*='=233
|
||||
'/='=234
|
||||
'%='=235
|
||||
'!='=236
|
||||
'|'=237
|
||||
'('=238
|
||||
')'=239
|
||||
','=240
|
||||
';'=241
|
||||
'->'=242
|
||||
'['=243
|
||||
']'=244
|
||||
'?'=245
|
||||
':'=246
|
||||
'{'=247
|
||||
'}'=248
|
||||
|
||||
@@ -890,6 +890,51 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#Log1pFunc.
|
||||
def enterLog1pFunc(self, ctx:MathExprParser.Log1pFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#Log1pFunc.
|
||||
def exitLog1pFunc(self, ctx:MathExprParser.Log1pFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#Expm1Func.
|
||||
def enterExpm1Func(self, ctx:MathExprParser.Expm1FuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#Expm1Func.
|
||||
def exitExpm1Func(self, ctx:MathExprParser.Expm1FuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IsnanFunc.
|
||||
def enterIsnanFunc(self, ctx:MathExprParser.IsnanFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IsnanFunc.
|
||||
def exitIsnanFunc(self, ctx:MathExprParser.IsnanFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IsinfFunc.
|
||||
def enterIsinfFunc(self, ctx:MathExprParser.IsinfFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IsinfFunc.
|
||||
def exitIsinfFunc(self, ctx:MathExprParser.IsinfFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IsfiniteFunc.
|
||||
def enterIsfiniteFunc(self, ctx:MathExprParser.IsfiniteFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IsfiniteFunc.
|
||||
def exitIsfiniteFunc(self, ctx:MathExprParser.IsfiniteFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#TNormFunc.
|
||||
def enterTNormFunc(self, ctx:MathExprParser.TNormFuncContext):
|
||||
pass
|
||||
@@ -1061,6 +1106,15 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#ProdFunc.
|
||||
def enterProdFunc(self, ctx:MathExprParser.ProdFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#ProdFunc.
|
||||
def exitProdFunc(self, ctx:MathExprParser.ProdFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#SortFunc.
|
||||
def enterSortFunc(self, ctx:MathExprParser.SortFuncContext):
|
||||
pass
|
||||
@@ -1502,6 +1556,24 @@ class MathExprListener(ParseTreeListener):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#IscloseFunc.
|
||||
def enterIscloseFunc(self, ctx:MathExprParser.IscloseFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#IscloseFunc.
|
||||
def exitIscloseFunc(self, ctx:MathExprParser.IscloseFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#AllcloseFunc.
|
||||
def enterAllcloseFunc(self, ctx:MathExprParser.AllcloseFuncContext):
|
||||
pass
|
||||
|
||||
# Exit a parse tree produced by MathExprParser#AllcloseFunc.
|
||||
def exitAllcloseFunc(self, ctx:MathExprParser.AllcloseFuncContext):
|
||||
pass
|
||||
|
||||
|
||||
# Enter a parse tree produced by MathExprParser#TMinFunc.
|
||||
def enterTMinFunc(self, ctx:MathExprParser.TMinFuncContext):
|
||||
pass
|
||||
|
||||
+4568
-4046
File diff suppressed because one or more lines are too long
@@ -499,6 +499,31 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#Log1pFunc.
|
||||
def visitLog1pFunc(self, ctx:MathExprParser.Log1pFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#Expm1Func.
|
||||
def visitExpm1Func(self, ctx:MathExprParser.Expm1FuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IsnanFunc.
|
||||
def visitIsnanFunc(self, ctx:MathExprParser.IsnanFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IsinfFunc.
|
||||
def visitIsinfFunc(self, ctx:MathExprParser.IsinfFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IsfiniteFunc.
|
||||
def visitIsfiniteFunc(self, ctx:MathExprParser.IsfiniteFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#TNormFunc.
|
||||
def visitTNormFunc(self, ctx:MathExprParser.TNormFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
@@ -594,6 +619,11 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#ProdFunc.
|
||||
def visitProdFunc(self, ctx:MathExprParser.ProdFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#SortFunc.
|
||||
def visitSortFunc(self, ctx:MathExprParser.SortFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
@@ -839,6 +869,16 @@ class MathExprVisitor(ParseTreeVisitor):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#IscloseFunc.
|
||||
def visitIscloseFunc(self, ctx:MathExprParser.IscloseFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#AllcloseFunc.
|
||||
def visitAllcloseFunc(self, ctx:MathExprParser.AllcloseFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
|
||||
# Visit a parse tree produced by MathExprParser#TMinFunc.
|
||||
def visitTMinFunc(self, ctx:MathExprParser.TMinFuncContext):
|
||||
return self.visitChildren(ctx)
|
||||
|
||||
@@ -2,6 +2,7 @@ import torch
|
||||
import sys
|
||||
import os
|
||||
import math
|
||||
import pytest
|
||||
|
||||
# Ensure we can import the module
|
||||
_here = os.path.abspath(os.path.dirname(__file__))
|
||||
@@ -11,6 +12,7 @@ if _project_root not in sys.path:
|
||||
|
||||
from more_math.Parser.UnifiedMathVisitor import UnifiedMathVisitor
|
||||
from more_math.Parser.antlr_router import get_antlr_modules
|
||||
from more_math.Parser.inbuilt_symbols import INBUILT_FUNCTIONS, INBUILT_KEYWORDS
|
||||
from antlr4 import InputStream, CommonTokenStream
|
||||
|
||||
MathExprLexer, MathExprParser, _ = get_antlr_modules()
|
||||
@@ -36,6 +38,24 @@ def test_mean():
|
||||
assert parse_and_visit("mean(l)", vars) == 2.0
|
||||
assert parse_and_visit("mean(s)", vars) == 5.0
|
||||
|
||||
@pytest.mark.parametrize("function", ("mean", "std", "var"))
|
||||
@pytest.mark.parametrize("dimension", ("0", "-1", "[0, 1]"))
|
||||
def test_statistic_uses_requested_dimensions(function, dimension):
|
||||
values = torch.tensor([[1.0, 3.0, 5.0], [2.0, 4.0, 8.0]])
|
||||
if dimension == "[0, 1]":
|
||||
expected = getattr(torch, function)(values.float(), dim=(0, 1))
|
||||
else:
|
||||
expected = getattr(torch, function)(values.float(), dim=int(dimension))
|
||||
|
||||
result = parse_and_visit(f"{function}(t, {dimension})", {"t": values})
|
||||
|
||||
if isinstance(expected, torch.Tensor) and expected.numel() == 1:
|
||||
expected = expected.item()
|
||||
if isinstance(result, torch.Tensor):
|
||||
torch.testing.assert_close(result, expected)
|
||||
else:
|
||||
assert math.isclose(result, expected, rel_tol=1e-5)
|
||||
|
||||
def test_std():
|
||||
t = torch.tensor([1.0, 5.0]) # mean=3, var=((2^2 + 2^2)/1) = 8. std = sqrt(8)=2.828...
|
||||
vars = {"t": t, "l": [1.0, 5.0]}
|
||||
@@ -69,3 +89,14 @@ def test_dot():
|
||||
# a2 flat = [1, 2], b2 flat = [3, 4] -> dot=11
|
||||
assert parse_and_visit("dot(a2, b2)", vars) == 11.0
|
||||
|
||||
def test_isclose_and_allclose_are_functions():
|
||||
a = torch.tensor([1.0, 2.0])
|
||||
b = torch.tensor([1.0, 2.000001])
|
||||
|
||||
assert "isclose" in INBUILT_FUNCTIONS
|
||||
assert "allclose" in INBUILT_FUNCTIONS
|
||||
assert "isclose" not in INBUILT_KEYWORDS
|
||||
assert "allclose" not in INBUILT_KEYWORDS
|
||||
torch.testing.assert_close(parse_and_visit("isclose(a, b)", {"a": a, "b": b}), torch.tensor([1.0, 1.0]))
|
||||
assert parse_and_visit("allclose(a, b)", {"a": a, "b": b}) == 1.0
|
||||
|
||||
|
||||
+12
-4
@@ -9,7 +9,7 @@ export const CONSTANTS = new Set([
|
||||
]);
|
||||
|
||||
export const FUNCTIONS = new Set([
|
||||
"abs", "acos", "acosh", "add_key", "added_keys", "all", "angle", "any", "append", "argmax", "argmin", "argsort", "as_nested", "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", "disable_tracking", "dist", "distance", "domain_warp", "domain_warp_noise", "dot", "edge", "elastic", "elastic_ease", "enable_tracking", "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", "gather", "gaussian", "gelu", "get_added_keys", "get_changed_keys", "get_removed_keys", "get_unchanged_keys", "get_value", "hist", "histogram", "hsv_to_rgb", "changed_keys", "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", "nonzero", "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", "removed_keys", "repeat", "replace", "reset_tracking", "reshape", "rgb_to_cielab", "rgb_to_hsv", "rgb_to_int", "rgb_to_oklab", "ridged", "ridged_noise", "rife", "rm_key", "roll", "round", "rshp", "scatter", "scatter_add", "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", "stack_clear", "stack_get", "stack_has", "stack_pop", "stack_push", "startswith", "std", "step", "substr", "substring", "sum", "svd", "swap", "swapaxes", "tan", "tanh", "tensor", "text_image", "timestamp", "tmax", "tmin", "tnorm", "topk", "topk_ind", "topk_indices", "track_off", "track_on", "track_reset", "transpose", "trim", "turbulence", "unchanged_keys", "unique", "unsqueeze", "upper", "var", "voronoi", "voronoi_noise", "where", "worley"
|
||||
"abs", "acos", "acosh", "add_key", "added_keys", "all", "allclose", "angle", "any", "append", "argmax", "argmin", "argsort", "as_nested", "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", "disable_tracking", "dist", "distance", "domain_warp", "domain_warp_noise", "dot", "edge", "elastic", "elastic_ease", "enable_tracking", "endswith", "entropy", "erf", "erfinv", "erode", "exp", "expm1", "ezconv", "ezconvolution", "fft", "find", "flatten", "flip", "float", "floor", "flow_ang", "flow_angle", "flow_apply", "flow_mag", "flow_magnitude", "flow_to_image", "fract", "gamma", "gather", "gaussian", "gelu", "get_added_keys", "get_changed_keys", "get_removed_keys", "get_unchanged_keys", "get_value", "hist", "histogram", "hsv_to_rgb", "changed_keys", "ifft", "int", "int_to_rgb", "interpolate_area", "interpolate_linear", "interpolate_nearest", "interpolate_nearest_exact", "isclose", "isfinite", "isinf", "isnan", "join", "keys", "length", "lerp", "linspace", "ln", "log", "log1p", "logspace", "lower", "map", "matmul", "mean", "median", "mode", "moment", "morph_close", "morph_open", "motion_mask", "nan_to_num", "noise", "nonzero", "now", "nvl", "oklab_to_rgb", "overlay", "pad", "percentile", "perlin", "perlin_noise", "perm", "permute", "pinv", "plasma", "plasma_noise", "popcnt", "popcount", "pow", "prcnt", "print", "print_shape", "prod", "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", "removed_keys", "repeat", "replace", "reset_tracking", "reshape", "rgb_to_cielab", "rgb_to_hsv", "rgb_to_int", "rgb_to_oklab", "ridged", "ridged_noise", "rife", "rm_key", "roll", "round", "rshp", "scatter", "scatter_add", "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", "stack_clear", "stack_get", "stack_has", "stack_pop", "stack_push", "startswith", "std", "step", "substr", "substring", "sum", "svd", "swap", "swapaxes", "tan", "tanh", "tensor", "text_image", "timestamp", "tmax", "tmin", "tnorm", "topk", "topk_ind", "topk_indices", "track_off", "track_on", "track_reset", "transpose", "trim", "turbulence", "unchanged_keys", "unique", "unsqueeze", "upper", "var", "voronoi", "voronoi_noise", "where", "worley"
|
||||
]);
|
||||
|
||||
export const FUNCTION_META = {
|
||||
@@ -31,6 +31,11 @@ export const FUNCTION_META = {
|
||||
"ln": { minArgs: 1, maxArgs: 1, snippet: "ln(x)", description: "applies natural logarithm to value (per element). Negative numbers return NaN (not a number)" },
|
||||
"log": { minArgs: 1, maxArgs: 1, snippet: "log(x)", description: "applies base 10 logarithm to value (per element). Negative numbers return NaN (not a number)" },
|
||||
"exp": { minArgs: 1, maxArgs: 1, snippet: "exp(x)", description: "applies e^x to value (per element)" },
|
||||
"log1p": { minArgs: 1, maxArgs: 1, snippet: "log1p(x)", description: "applies ln(1+x) accurately for values near zero" },
|
||||
"expm1": { minArgs: 1, maxArgs: 1, snippet: "expm1(x)", description: "applies exp(x)-1 accurately for values near zero" },
|
||||
"isnan": { minArgs: 1, maxArgs: 1, snippet: "isnan(x)", description: "returns 1.0 for NaN values and 0.0 otherwise" },
|
||||
"isinf": { minArgs: 1, maxArgs: 1, snippet: "isinf(x)", description: "returns 1.0 for infinite values and 0.0 otherwise" },
|
||||
"isfinite": { minArgs: 1, maxArgs: 1, snippet: "isfinite(x)", description: "returns 1.0 for finite values and 0.0 otherwise" },
|
||||
"smin": { minArgs: 1, maxArgs: null, snippet: "smin(x, ...)", description: "computes the minimum of inputs or elements. Tensors must have the same size or be broadcastable to same size. When called as smin(x, dims) with x a tensor/list, reduces x along dims (a single dim or list of dims) instead." },
|
||||
"smax": { minArgs: 1, maxArgs: null, snippet: "smax(x, ...)", description: "computes the maximum of inputs or elements. Tensors must have the same size or be broadcastable to same size. When called as smax(x, dims) with x a tensor/list, reduces x along dims (a single dim or list of dims) instead." },
|
||||
"tmin": { minArgs: 2, maxArgs: 2, snippet: "tmin(x, y)", description: "elementwise minimum of tensor or list. min(x,y) when inputs are floats" },
|
||||
@@ -79,9 +84,12 @@ export const FUNCTION_META = {
|
||||
"botk": { minArgs: 2, maxArgs: 2, snippet: "botk(x, k)", description: "returns the k smallest elements of x. For tensors it keeps them in place." },
|
||||
"pinv": { minArgs: 1, maxArgs: 1, snippet: "pinv(x)", description: "computes the permutative inverse of a list x (list must have uniqe elements) -- TODO: CHECK --" },
|
||||
"sum": { minArgs: 1, maxArgs: 2, snippet: "sum(x, dims)", description: "computes the sum of elements of x, optionally along one or more dimensions" },
|
||||
"mean": { minArgs: 1, maxArgs: 1, snippet: "mean(x)", description: "computes the arithmetic mean of elements of x" },
|
||||
"std": { minArgs: 1, maxArgs: 1, snippet: "std(x)", description: "computes the standard deviation of elements of x" },
|
||||
"var": { minArgs: 1, maxArgs: 1, snippet: "var(x)", description: "computes the variance of elements of x" },
|
||||
"mean": { minArgs: 1, maxArgs: 2, snippet: "mean(x, dims)", description: "computes the arithmetic mean of elements of x globally or along one or more dimensions" },
|
||||
"std": { minArgs: 1, maxArgs: 2, snippet: "std(x, dims)", description: "computes the sample standard deviation of elements of x globally or along one or more dimensions" },
|
||||
"var": { minArgs: 1, maxArgs: 2, snippet: "var(x, dims)", description: "computes the sample variance of elements of x globally or along one or more dimensions" },
|
||||
"prod": { minArgs: 1, maxArgs: 2, snippet: "prod(x, dims)", description: "computes the product of elements of x globally or along one or more dimensions" },
|
||||
"isclose": { minArgs: 2, maxArgs: 4, snippet: "isclose(a, b, rtol, atol)", description: "elementwise approximate equality test" },
|
||||
"allclose": { minArgs: 2, maxArgs: 4, snippet: "allclose(a, b, rtol, atol)", description: "returns 1.0 if all elements are approximately equal, else 0.0" },
|
||||
"quartile": { minArgs: 2, maxArgs: 2, snippet: "quartile(x, q)", description: "computes the q-th quartile of x" },
|
||||
"quartil": { minArgs: 2, maxArgs: 2, snippet: "quartil(x, q)", description: "computes the q-th quartile of x" },
|
||||
"percentile": { minArgs: 2, maxArgs: 2, snippet: "percentile(x, p)", description: "computes the p-th percentile of x" },
|
||||
|
||||
Reference in New Issue
Block a user