AI: readme audit 1 pas
This commit is contained in:
+10
-9
@@ -9,7 +9,7 @@ export const CONSTANTS = new Set([
|
||||
]);
|
||||
|
||||
export const FUNCTIONS = new Set([
|
||||
"abs", "acos", "acosh", "add_key", "all", "angle", "any", "append", "argmax", "argmin", "argsort", "as_nested_tensor", "asin", "asinh", "atan", "atan2", "atanh", "band", "batch_shuffle", "bitcount", "bitwise_and", "bitwise_not", "bitwise_or", "bitwise_xor", "blur", "bnot", "bor", "botk", "botk_ind", "botk_indices", "bxor", "cat", "ceil", "cellular", "cellular_noise", "cielab_to_rgb", "clamp", "cnt", "concat", "concatenate", "conv", "convolution", "coordinates", "coords", "corr", "correlation", "cos", "cosh", "cosine_similarity", "cossim", "count", "cov", "crop", "cross", "cubic", "cubic_ease", "cumprod", "cumsum", "diag", "diagonal_matrix", "dilate", "dist", "distance", "domain_warp", "domain_warp_noise", "dot", "edge", "elastic", "elastic_ease", "endswith", "entropy", "erf", "erfinv", "erode", "exp", "ezconv", "ezconvolution", "fft", "find", "flatten", "flip", "float", "floor", "flow_ang", "flow_angle", "flow_apply", "flow_mag", "flow_magnitude", "flow_to_image", "fract", "gamma", "gaussian", "gelu", "get_value", "hist", "histogram", "hsv_to_rgb", "ifft", "int", "int_to_rgb", "interpolate_area", "interpolate_linear", "interpolate_nearest", "interpolate_nearest_exact", "join", "keys", "length", "lerp", "linspace", "ln", "log", "logspace", "lower", "map", "matmul", "mean", "median", "mode", "moment", "morph_close", "morph_open", "motion_mask", "nan_to_num", "noise", "now", "nvl", "oklab_to_rgb", "overlay", "pad", "percentile", "perlin", "perlin_noise", "perm", "permute", "pinv", "plasma", "plasma_noise", "popcnt", "popcount", "pow", "prcnt", "print", "print_shape", "pshp", "quantile", "quartil", "quartile", "rand", "randb", "randbeta", "randc", "randchi2", "rande", "randg", "randgumbel", "randl", "randln", "randn", "random_bernoulli", "random_beta", "random_cauchy", "random_chi2", "random_exponential", "random_gamma", "random_gumbel", "random_laplace", "random_log_normal", "random_normal", "random_poisson", "random_studentt", "random_uniform", "random_weibull", "randp", "randt", "randu", "randw", "range", "relu", "remap", "remove_key", "repeat", "replace", "reshape", "rgb_to_cielab", "rgb_to_hsv", "rgb_to_int", "rgb_to_oklab", "ridged", "ridged_noise", "rife", "rm_kay", "roll", "round", "rshp", "select", "shape", "shuffle", "sigm", "sign", "sin", "sine", "sine_ease", "singular_value_decomposition", "sinh", "smax", "smin", "smootherstep", "smoothstep", "snorm", "softmax", "softmin", "softplus", "sort", "split", "sqrt", "squeeze", "stack_clear", "stack_get", "stack_has", "stack_pop", "stack_push", "startswith", "std", "step", "substr", "substring", "sum", "svd", "swap", "tan", "tanh", "tensor", "text_image", "timestamp", "tmax", "tmin", "tnorm", "topk", "topk_ind", "topk_indices", "trim", "turbulence", "unique", "unsqueeze", "upper", "var", "voronoi", "voronoi_noise", "where", "worley"
|
||||
"abs", "acos", "acosh", "add_key", "all", "angle", "any", "append", "argmax", "argmin", "argsort", "as_nested", "as_nested_tensor", "asin", "asinh", "atan", "atan2", "atanh", "band", "batch_shuffle", "bitcount", "bitwise_and", "bitwise_not", "bitwise_or", "bitwise_xor", "blur", "bnot", "bor", "botk", "botk_ind", "botk_indices", "bxor", "cat", "ceil", "cellular", "cellular_noise", "cielab_to_rgb", "clamp", "cnt", "concat", "concatenate", "conv", "convolution", "coordinates", "coords", "corr", "correlation", "cos", "cosh", "cosine_similarity", "cossim", "count", "cov", "crop", "cross", "cubic", "cubic_ease", "cumprod", "cumsum", "diag", "diagonal_matrix", "dilate", "dist", "distance", "domain_warp", "domain_warp_noise", "dot", "edge", "elastic", "elastic_ease", "endswith", "entropy", "erf", "erfinv", "erode", "exp", "ezconv", "ezconvolution", "fft", "find", "flatten", "flip", "float", "floor", "flow_ang", "flow_angle", "flow_apply", "flow_mag", "flow_magnitude", "flow_to_image", "fract", "gamma", "gaussian", "gelu", "get_value", "hist", "histogram", "hsv_to_rgb", "ifft", "int", "int_to_rgb", "interpolate_area", "interpolate_linear", "interpolate_nearest", "interpolate_nearest_exact", "join", "keys", "length", "lerp", "linspace", "ln", "log", "logspace", "lower", "map", "matmul", "mean", "median", "mode", "moment", "morph_close", "morph_open", "motion_mask", "nan_to_num", "noise", "now", "nvl", "oklab_to_rgb", "overlay", "pad", "percentile", "perlin", "perlin_noise", "perm", "permute", "pinv", "plasma", "plasma_noise", "popcnt", "popcount", "pow", "prcnt", "print", "print_shape", "pshp", "quantile", "quartil", "quartile", "rand", "randb", "randbeta", "randc", "randchi2", "rande", "randg", "randgumbel", "randl", "randln", "randn", "random_bernoulli", "random_beta", "random_cauchy", "random_chi2", "random_exponential", "random_gamma", "random_gumbel", "random_laplace", "random_log_normal", "random_normal", "random_poisson", "random_studentt", "random_uniform", "random_weibull", "randp", "randt", "randu", "randw", "range", "relu", "remap", "remove_key", "repeat", "replace", "reshape", "rgb_to_cielab", "rgb_to_hsv", "rgb_to_int", "rgb_to_oklab", "ridged", "ridged_noise", "rife", "rm_kay", "roll", "round", "rshp", "select", "shape", "shuffle", "sigm", "sign", "sin", "sine", "sine_ease", "singular_value_decomposition", "sinh", "smax", "smin", "smootherstep", "smoothstep", "snorm", "softmax", "softmin", "softplus", "sort", "split", "sqrt", "squeeze", "stack_clear", "stack_get", "stack_has", "stack_pop", "stack_push", "startswith", "std", "step", "substr", "substring", "sum", "svd", "swap", "tan", "tanh", "tensor", "text_image", "timestamp", "tmax", "tmin", "tnorm", "topk", "topk_ind", "topk_indices", "trim", "turbulence", "unique", "unsqueeze", "upper", "var", "voronoi", "voronoi_noise", "where", "worley"
|
||||
]);
|
||||
|
||||
export const FUNCTION_META = {
|
||||
@@ -31,11 +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)" },
|
||||
"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." },
|
||||
"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." },
|
||||
"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" },
|
||||
"tmax": { minArgs: 2, maxArgs: 2, snippet: "tmax(x, y)", description: "elementwise maximum of tensor or list. max(x,y) when inputs are floats" },
|
||||
"tnorm": { minArgs: 1, maxArgs: 1, snippet: "tnorm(x)", description: "normalises tensor or list by multiplication such that sum(x^2)==1.0 for each slice. The slice is last dimension of the tensor." },
|
||||
"tnorm": { minArgs: 1, maxArgs: 2, snippet: "tnorm(x, dim)", description: "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." },
|
||||
"snorm": { minArgs: 1, maxArgs: 2, snippet: "snorm(x, dim)", description: "frobenius norm of tensor. Along dimension if dimension specified. Dimension can be a list. Defaults to no dimension." },
|
||||
"floor": { minArgs: 1, maxArgs: 1, snippet: "floor(x)", description: "returns the largest integer less than or equal to x" },
|
||||
"ceil": { minArgs: 1, maxArgs: 1, snippet: "ceil(x)", description: "returns the smallest integer greater than or equal to x" },
|
||||
@@ -45,7 +45,7 @@ export const FUNCTION_META = {
|
||||
"sigm": { minArgs: 1, maxArgs: 1, snippet: "sigm(x)", description: "applies the sigmoid function: 1 / (1 + exp(-x))" },
|
||||
"clamp": { minArgs: 3, maxArgs: 3, snippet: "clamp(x, min, max)", description: "clamps x between min and max per element" },
|
||||
"fft": { minArgs: 1, maxArgs: 1, snippet: "fft(x)", description: "computes fast Fourier transform of x" },
|
||||
"ifft": { minArgs: 1, maxArgs: 2, snippet: "ifft(x, axis)", description: "inverse fast Fourier transform" },
|
||||
"ifft": { minArgs: 1, maxArgs: 2, snippet: "ifft(x, shape)", description: "inverse fast Fourier transform of x. shape (defaults to the node's tensor shape) sizes the K/Kx/Ky/.../frequency variables made available while evaluating x, it does not resize x itself." },
|
||||
"angle": { minArgs: 1, maxArgs: 1, snippet: "angle(x)", description: "returns the angle of a complex number or vector" },
|
||||
"print": { minArgs: 1, maxArgs: 1, snippet: "print(x)", description: "prints the value of x to the console while passing output unchanged" },
|
||||
"print_shape": { minArgs: 1, maxArgs: 1, snippet: "print_shape(x)", description: "prints the shape of the tensor x" },
|
||||
@@ -85,7 +85,7 @@ export const FUNCTION_META = {
|
||||
"percentile": { minArgs: 2, maxArgs: 2, snippet: "percentile(x, p)", description: "computes the p-th percentile of x" },
|
||||
"prcnt": { minArgs: 2, maxArgs: 2, snippet: "prcnt(x, p)", description: "computes the p-th percentile of x" },
|
||||
"quantile": { minArgs: 2, maxArgs: 2, snippet: "quantile(x, q)", description: "computes the q-th quantile of x" },
|
||||
"dot": { minArgs: 2, maxArgs: 2, snippet: "dot(x, y)", description: "computes the dot product of x and y. Last dimension must be 3." },
|
||||
"dot": { minArgs: 2, maxArgs: 2, snippet: "dot(x, y)", description: "computes the dot product of x and y after flattening both to 1D. Use cross(x, y) if you need a per-vector product with the last dimension kept." },
|
||||
"moment": { minArgs: 3, maxArgs: 3, snippet: "moment(x, a, k)", description: "computes the k-th moment of x around a" },
|
||||
"erf": { minArgs: 1, maxArgs: 1, snippet: "erf(x)", description: "computes the error function (torch.erf)" },
|
||||
"erfinv": { minArgs: 1, maxArgs: 1, snippet: "erfinv(x)", description: "computes the inverse error function (torch.erfinv)" },
|
||||
@@ -139,7 +139,7 @@ export const FUNCTION_META = {
|
||||
"pad": { minArgs: 2, maxArgs: 2, snippet: "pad(x, padding)", description: "pads tensor x with specified padding (dim 0 neg, dim 0 pos, dim 1 ...)" },
|
||||
"cross": { minArgs: 2, maxArgs: 2, snippet: "cross(x, y)", description: "computes the cross product of x and y. Last dimension must be 3" },
|
||||
"matmul": { minArgs: 2, maxArgs: 2, snippet: "matmul(x, y)", description: "computes the matrix multiplication of x and y" },
|
||||
"rife": { minArgs: 2, maxArgs: 5, snippet: "rife(image1, image2, tile_size, iterations, multi_scale)", description: "computes an intermediate frame between image1 and image2 using RIFE" },
|
||||
"rife": { minArgs: 2, maxArgs: 5, snippet: "rife(image1, image2, tiling_size, iterations, multi_scale)", description: "computes the optical flow field ([H, W, 2]) between image1 and image2 using a RAFT-based model" },
|
||||
"bnot": { minArgs: 1, maxArgs: 1, snippet: "bnot(x)", description: "computes the bitwise NOT" },
|
||||
"bitwise_not": { minArgs: 1, maxArgs: 1, snippet: "bitwise_not(x)", description: "computes the bitwise NOT" },
|
||||
"bitcount": { minArgs: 1, maxArgs: 1, snippet: "bitcount(x)", description: "returns the number of set bits" },
|
||||
@@ -171,8 +171,8 @@ export const FUNCTION_META = {
|
||||
"trim": { minArgs: 1, maxArgs: 1, snippet: "trim(x)", description: "removes leading and trailing whitespace from string" },
|
||||
"split": { minArgs: 1, maxArgs: 2, snippet: "split(x, delimiter)", description: "splits string to list of strings based on delimiter. Default is space." },
|
||||
"join": { minArgs: 1, maxArgs: 2, snippet: "join(x, separator)", description: "joins strings in list using separator. Defalut separator is \"\". If you want to join tensors use concatinate(...)" },
|
||||
"substring": { minArgs: 2, maxArgs: 3, snippet: "substring(s, start, end)", description: "returns a substring of s from start to end. If end is not supplied, it uses end of string" },
|
||||
"substr": { minArgs: 2, maxArgs: 3, snippet: "substr(s, start, end)", description: "returns a substring of s from start to end. If end is not supplied, it uses end of string" },
|
||||
"substring": { minArgs: 2, maxArgs: 3, snippet: "substring(s, start, length)", description: "returns length characters of s starting at start. If length is not supplied, it returns the rest of the string" },
|
||||
"substr": { minArgs: 2, maxArgs: 3, snippet: "substr(s, start, length)", description: "returns length characters of s starting at start. If length is not supplied, it returns the rest of the string" },
|
||||
"find": { minArgs: 2, maxArgs: 2, snippet: "find(s, sub)", description: "returns the index of the first occurrence of sub in s. -1 if not found. Works only for strings." },
|
||||
"replace": { minArgs: 3, maxArgs: 3, snippet: "replace(s, old, new)", description: "replaces occurrences of old with new in s. Mostly for strings but can work with lists and tensors." },
|
||||
"dilate": { minArgs: 1, maxArgs: 2, snippet: "dilate(x, kernel)", description: "applies dilation to x. kernel is optional." },
|
||||
@@ -193,6 +193,7 @@ export const FUNCTION_META = {
|
||||
"interpolate_nearest_exact": { minArgs: 2, maxArgs: 2, snippet: "interpolate_nearest_exact(x, y)", description: "performs nearest neighbor interpolation X. Assumes that dim 0 is batch and dim 1 = channel" },
|
||||
"text_image": { minArgs: 3, maxArgs: 9, snippet: "text_image(text, font, size, max_width, weight, rotation_angle, line_spacing, italic, underline)", description: "renders text to an 2D tensor" },
|
||||
"as_nested_tensor": { minArgs: 1, maxArgs: 1, snippet: "as_nested_tensor(x)", description: "converts a list to a nested tensor (special object containing tensors of different shapes behaving like a tensor)" },
|
||||
"as_nested": { minArgs: 1, maxArgs: 1, snippet: "as_nested(x)", description: "converts a list to a nested tensor (special object containing tensors of different shapes behaving like a tensor)" },
|
||||
"svd": { minArgs: 1, maxArgs: 2, snippet: "svd(x, full_matrices)", description: "computes the singular value decomposition of x. Returns a list of 3 tensors: U, S, V such that x = matmul(matmul(U, diagonal_matrix(S,shape(U))), V)" },
|
||||
"singular_value_decomposition": { minArgs: 1, maxArgs: 2, snippet: "singular_value_decomposition(x, full_matrices)", description: "computes the singular value decomposition of x. Returns a list of 3 tensors: U, S, V such that x = matmul(matmul(U, diagonal_matrix(S,shape(U))), V)" },
|
||||
"diagonal_matrix": { minArgs: 2, maxArgs: 5, snippet: "diagonal_matrix(x, shape, offset, dim1, dim2)", description: "creates a diagonal matrix from x with specified shape. offset is the diagonal offset. dim1 and dim2 are the dimensions to place the diagonal on." },
|
||||
|
||||
Reference in New Issue
Block a user