abs(t) |
map(t, f(x)(abs(x))) |
Absolute value of all elements. |
|
acos(t) |
map(t, f(x)(acos(x))) |
Arc cosine of all elements. |
|
t1 + t2 |
join(t1, t2, f(x, y)(x + y)) |
Join and sum tensors t1 and t2. |
|
argmax(t) |
join(t, max(t), f(x, y)(if(x == y, 1, 0))) |
A tensor with cell(s) of the highest value(s) in the tensor set to 1. |
|
argmin(t) |
join(t, min(t), f(x, y)(if(x >= y, 0, 1))) |
A tensor with cell(s) of the lowest value(s) in the tensor set to 1. |
|
asin(t) |
map(t, f(x)(asin(x))) |
Arc sine of all elements. |
|
atan(t) |
map(t, f(x)(atan(x))) |
Arc tangent of all elements. |
|
atan2(t1, t2) |
join(t1, t2, f(x, y)(atan2(x, y))) |
Arctangent of t1 and t2. |
|
avg(t, dim) |
reduce(t, avg, dim) |
Reduce the tensor with the average aggregator along dimension dim. |
|
ceil(t) |
map(t, f(x)(ceil(x))) |
Ceiling of all elements. |
|
count(t, dim) |
reduce(t, count, dim) |
Reduce the tensor with the count aggregator along dimension dim. |
|
cos(t) |
map(t, f(x)(cos(x))) |
Cosine of all elements. |
|
cosh(t) |
map(t, f(x)(cosh(x))) |
Hyperbolic cosine of all elements. |
|
diag(n1, n2) |
tensor(i[n1], j[n2])(if(i == j, 1.0, 0.0))) |
A tensor with the diagonal set to 1.0. |
|
t1/t2 |
join(t1, t2, f(x, y)(x/y)) |
Join and divide tensors t1 and t2. |
|
elu(t) |
map(t, f(x)(if(x < 0, exp(x) − 1, x))) |
Exponential linear unit. |
|
t1 == t2 |
join(t1, t2, f(x, y)(x == y)) |
Join and determine if each element in t1 and t2 are equal. |
|
exp(t) |
map(t, f(x)(exp(x))) |
Exponential function (ex) of each element. |
|
floor(t) |
map(t, f(x)(floor(x))) |
Floor of each element. |
|
t1 > t2 |
join(t1, t2, f(x, y)(x > y)) |
Join and determine if each element in t1 is greater than t2. |
|
t1 >= t2 |
join(t1, t2, f(x, y)(x >= y)) |
Join and determine if each element in t1 is greater than or equals t2. |
|
t1 < t2 |
join(t1, t2, f(x, y)(x < y)) |
Join and determine if each element in t1 is less than t2. |
|
t1 <= t2 |
join(t1, t2, f(x, y)(x <= y)) |
Join and determine if each element in t1 is less than or equals t2. |
|
l1_normalize(t, dim) |
join(t, reduce(t, sum, dim), f(x, y)(x/y)) |
L1 normalization: t/sum(t, dim). |
|
l2_normalize(t, dim) |
join(t, map(reduce(map(t, f(x)(x ∗ x)), sum, dim), f(x)(sqrt(x))), f(x, y)(x/y)) |
L2 normalization: t/sqrt(sum(t2, dim). |
|
log(t) |
map(t, f(x)(log(x))) |
Natural logarithm of each element. |
|
log10(t) |
map(t, f(x)(log10(x))) |
Logarithm with base 10 of each element. |
|
matmul(t1, t2, dim) |
reduce(join(t1, t2, f(x, y)(x ∗ y)), sum, dim) |
Matrix multiplication of two tensors. This is the product of the two tensors summed along a shared dimension. |
|
max(t, dim) |
reduce(t, max, dim) |
Reduce the tensor with the max aggregator along dimension dim. |
|
max(t1, t2) |
join(t1, t2, f(x, y)(max(x, y))) |
Join and return the max of t1 or t2. Arguments can be scalars. |
|
min(t, dim) |
reduce(t, min, dim) |
Reduce the tensor with the min aggregator along dimension dim. |
|
min(t1, t2) |
join(t1, t2, f(x, y)(min(x, y))) |
Join and return the minimum of t1 or t2. Arguments can be scalars. |
|
mod(t, constant) |
map(t, f(x)(mod(x, constant))) |
Modulus of constant with each element. |
|
t1 ∗ t2 |
join(t1, t2, f(x, y)(x ∗ y)) |
Join and multiply tensors t1 and t2. |
|
t1 != t2 |
join(t1, t2, f(x, y)(x != y)) |
Join and determine if each element in t1 and t2 are not equal. |
|
pow(t, constant) |
map(t, f(x)(pow(x, constant))) |
Raise each element to the power of constant. |
|
prod(t, dim) |
reduce(t, prod, dim) |
Reduce the tensor with the product aggregator along dimension dim. |
|
random(n1, n2, ...) |
tensor(i1[n1], i2[n2], ...)(random(1.0)) |
A tensor with random values between 0.0 and 1.0, uniform distribution. |
|
range(n) |
tensor(i[n])(i) |
A tensor with increasing values. |
|
relu(t) |
map(t, f(x)(max(0, x))) |
Rectified linear unit. |
|
round(t) |
map(t, f(x)(round(x))) |
Round each element. |
|
sigmoid(t) |
map(t, f(x)(1.0/(1.0 + exp(0.0 − x)))) |
The sigmoid of each element. |
|
sin(t) |
map(t, f(x)(sin(x))) |
Sinus of each element. |
|
sinh(t) |
map(t, f(x)(sinh(x))) |
Hyperbolic sinus of each element. |
|
sign(t) |
map(t, f(x)(if(x < 0, −1.0, 1.0))) |
The sign of each element. |
|
softmax(t, dim) |
join(map(t, f(x)(exp(x))), reduce(map(t, f(x)(exp(x))), sum, dim), f(x, y)(x/y)) |
The softmax of the tensor, e.g. ex/sum(ex). |
|
sqrt(t) |
map(t, f(x)(sqrt(x))) |
The square root of each element. |
|
square(t) |
map(t, f(x)(square(x))) |
The square of each element. |
|
t1 − t2 |
join(t1, t2, f(x, y)(x − y)) |
Join and subtract tensors t1 and t2. |
|
sum(t, dim) |
reduce(t, sum, dim) |
Reduce the tensor with the summation aggregator along dimension dim. |
|
tan(t) |
map(t, f(x)(tan(x))) |
The tangent of each element. |
|
tanh(t) |
map(t, f(x)(tanh(x))) |
The hyperbolic tangent of each element. |
|
xw_plus_b(x, w, b, dim) |
join(reduce(join(x, w, f(x, y)(x ∗ y)), sum, dim), b, f(x, y)(x + y)) |
Matrix multiplication of x (usually a vector) and w (weights), with b added (bias). |
|