public class SDMath extends SDOps
Modifier and Type | Method and Description |
---|---|
SDVariable |
abs(SDVariable x)
Elementwise absolute value operation: out = abs(x)
|
SDVariable |
abs(String name,
SDVariable x)
Elementwise absolute value operation: out = abs(x)
|
SDVariable |
acos(SDVariable x)
Elementwise acos (arccosine, inverse cosine) operation: out = arccos(x)
|
SDVariable |
acos(String name,
SDVariable x)
Elementwise acos (arccosine, inverse cosine) operation: out = arccos(x)
|
SDVariable |
acosh(SDVariable x)
Elementwise acosh (inverse hyperbolic cosine) function: out = acosh(x)
|
SDVariable |
acosh(String name,
SDVariable x)
Elementwise acosh (inverse hyperbolic cosine) function: out = acosh(x)
|
SDVariable |
add(SDVariable x,
double value)
Scalar add operation, out = in + scalar
|
SDVariable |
add(SDVariable x,
SDVariable y)
Pairwise addition operation, out = x + y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
add(String name,
SDVariable x,
double value)
Scalar add operation, out = in + scalar
|
SDVariable |
add(String name,
SDVariable x,
SDVariable y)
Pairwise addition operation, out = x + y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
amax(SDVariable in,
int... dimensions)
Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))
|
SDVariable |
amax(String name,
SDVariable in,
int... dimensions)
Absolute max array reduction operation, optionally along specified dimensions: out = max(abs(x))
|
SDVariable |
amean(SDVariable in,
int... dimensions)
Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))
|
SDVariable |
amean(String name,
SDVariable in,
int... dimensions)
Absolute mean array reduction operation, optionally along specified dimensions: out = mean(abs(x))
|
SDVariable |
amin(SDVariable in,
int... dimensions)
Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))
|
SDVariable |
amin(String name,
SDVariable in,
int... dimensions)
Absolute min array reduction operation, optionally along specified dimensions: out = min(abs(x))
|
SDVariable |
and(SDVariable x,
SDVariable y)
Boolean AND operation: elementwise (x != 0) && (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs. Note: supports broadcasting if x and y have different shapes and are broadcastable. Returns an array with values 1 where condition is satisfied, or value 0 otherwise. |
SDVariable |
and(String name,
SDVariable x,
SDVariable y)
Boolean AND operation: elementwise (x != 0) && (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs. Note: supports broadcasting if x and y have different shapes and are broadcastable. Returns an array with values 1 where condition is satisfied, or value 0 otherwise. |
SDVariable |
asin(SDVariable x)
Elementwise asin (arcsin, inverse sine) operation: out = arcsin(x)
|
SDVariable |
asin(String name,
SDVariable x)
Elementwise asin (arcsin, inverse sine) operation: out = arcsin(x)
|
SDVariable |
asinh(SDVariable x)
Elementwise asinh (inverse hyperbolic sine) function: out = asinh(x)
|
SDVariable |
asinh(String name,
SDVariable x)
Elementwise asinh (inverse hyperbolic sine) function: out = asinh(x)
|
SDVariable |
asum(SDVariable in,
int... dimensions)
Absolute sum array reduction operation, optionally along specified dimensions: out = sum(abs(x))
|
SDVariable |
asum(String name,
SDVariable in,
int... dimensions)
Absolute sum array reduction operation, optionally along specified dimensions: out = sum(abs(x))
|
SDVariable |
atan(SDVariable x)
Elementwise atan (arctangent, inverse tangent) operation: out = arctangent(x)
|
SDVariable |
atan(String name,
SDVariable x)
Elementwise atan (arctangent, inverse tangent) operation: out = arctangent(x)
|
SDVariable |
atan2(SDVariable y,
SDVariable x)
Elementwise atan (arctangent, inverse tangent) operation: out = atan2(x,y).
Similar to atan(y/x) but sigts of x and y are used to determine the location of the result |
SDVariable |
atan2(String name,
SDVariable y,
SDVariable x)
Elementwise atan (arctangent, inverse tangent) operation: out = atan2(x,y).
Similar to atan(y/x) but sigts of x and y are used to determine the location of the result |
SDVariable |
atanh(SDVariable x)
Elementwise atanh (inverse hyperbolic tangent) function: out = atanh(x)
|
SDVariable |
atanh(String name,
SDVariable x)
Elementwise atanh (inverse hyperbolic tangent) function: out = atanh(x)
|
SDVariable |
bitShift(SDVariable x,
SDVariable shift)
Bit shift operation
|
SDVariable |
bitShift(String name,
SDVariable x,
SDVariable shift)
Bit shift operation
|
SDVariable |
bitShiftRight(SDVariable x,
SDVariable shift)
Right bit shift operation
|
SDVariable |
bitShiftRight(String name,
SDVariable x,
SDVariable shift)
Right bit shift operation
|
SDVariable |
bitShiftRotl(SDVariable x,
SDVariable shift)
Cyclic bit shift operation
|
SDVariable |
bitShiftRotl(String name,
SDVariable x,
SDVariable shift)
Cyclic bit shift operation
|
SDVariable |
bitShiftRotr(SDVariable x,
SDVariable shift)
Cyclic right shift operation
|
SDVariable |
bitShiftRotr(String name,
SDVariable x,
SDVariable shift)
Cyclic right shift operation
|
SDVariable |
ceil(SDVariable x)
Element-wise ceiling function: out = ceil(x).
Rounds each value up to the nearest integer value (if not already an integer) |
SDVariable |
ceil(String name,
SDVariable x)
Element-wise ceiling function: out = ceil(x).
Rounds each value up to the nearest integer value (if not already an integer) |
SDVariable |
clipByAvgNorm(SDVariable x,
double clipValue,
int... dimensions)
Clips tensor values to a maximum average L2-norm.
|
SDVariable |
clipByAvgNorm(String name,
SDVariable x,
double clipValue,
int... dimensions)
Clips tensor values to a maximum average L2-norm.
|
SDVariable |
clipByNorm(SDVariable x,
double clipValue,
int... dimensions)
Clipping by L2 norm, optionally along dimension(s)
if l2Norm(x,dimension) < clipValue, then input is returned unmodifed Otherwise, out[i] = in[i] * clipValue / l2Norm(in, dimensions) where each value is clipped according to the corresponding l2Norm along the specified dimensions |
SDVariable |
clipByNorm(String name,
SDVariable x,
double clipValue,
int... dimensions)
Clipping by L2 norm, optionally along dimension(s)
if l2Norm(x,dimension) < clipValue, then input is returned unmodifed Otherwise, out[i] = in[i] * clipValue / l2Norm(in, dimensions) where each value is clipped according to the corresponding l2Norm along the specified dimensions |
SDVariable |
clipByValue(SDVariable x,
double clipValueMin,
double clipValueMax)
Element-wise clipping function:
out[i] = in[i] if in[i] >= clipValueMin and in[i] <= clipValueMax out[i] = clipValueMin if in[i] < clipValueMin out[i] = clipValueMax if in[i] > clipValueMax |
SDVariable |
clipByValue(String name,
SDVariable x,
double clipValueMin,
double clipValueMax)
Element-wise clipping function:
out[i] = in[i] if in[i] >= clipValueMin and in[i] <= clipValueMax out[i] = clipValueMin if in[i] < clipValueMin out[i] = clipValueMax if in[i] > clipValueMax |
SDVariable |
confusionMatrix(SDVariable labels,
SDVariable pred,
DataType dataType)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. |
SDVariable |
confusionMatrix(SDVariable labels,
SDVariable pred,
int numClasses)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. For example, if labels = [0, 1, 1], predicted = [0, 2, 1], and numClasses=4 then output is: [1, 0, 0, 0] [0, 1, 1, 0] [0, 0, 0, 0] [0, 0, 0, 0] |
SDVariable |
confusionMatrix(SDVariable labels,
SDVariable pred,
SDVariable weights)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. |
SDVariable |
confusionMatrix(SDVariable labels,
SDVariable pred,
SDVariable weights,
int numClasses)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. For example, if labels = [0, 1, 1], predicted = [0, 2, 1], numClasses = 4, and weights = [1, 2, 3] [1, 0, 0, 0] [0, 3, 2, 0] [0, 0, 0, 0] [0, 0, 0, 0] |
SDVariable |
confusionMatrix(String name,
SDVariable labels,
SDVariable pred,
DataType dataType)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. |
SDVariable |
confusionMatrix(String name,
SDVariable labels,
SDVariable pred,
int numClasses)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. For example, if labels = [0, 1, 1], predicted = [0, 2, 1], and numClasses=4 then output is: [1, 0, 0, 0] [0, 1, 1, 0] [0, 0, 0, 0] [0, 0, 0, 0] |
SDVariable |
confusionMatrix(String name,
SDVariable labels,
SDVariable pred,
SDVariable weights)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. |
SDVariable |
confusionMatrix(String name,
SDVariable labels,
SDVariable pred,
SDVariable weights,
int numClasses)
Compute the 2d confusion matrix of size [numClasses, numClasses] from a pair of labels and predictions, both of
which are represented as integer values. For example, if labels = [0, 1, 1], predicted = [0, 2, 1], numClasses = 4, and weights = [1, 2, 3] [1, 0, 0, 0] [0, 3, 2, 0] [0, 0, 0, 0] [0, 0, 0, 0] |
SDVariable |
cos(SDVariable x)
Elementwise cosine operation: out = cos(x)
|
SDVariable |
cos(String name,
SDVariable x)
Elementwise cosine operation: out = cos(x)
|
SDVariable |
cosh(SDVariable x)
Elementwise cosh (hyperbolic cosine) operation: out = cosh(x)
|
SDVariable |
cosh(String name,
SDVariable x)
Elementwise cosh (hyperbolic cosine) operation: out = cosh(x)
|
SDVariable |
cosineDistance(SDVariable x,
SDVariable y,
int... dimensions)
Cosine distance reduction operation.
|
SDVariable |
cosineDistance(String name,
SDVariable x,
SDVariable y,
int... dimensions)
Cosine distance reduction operation.
|
SDVariable |
cosineSimilarity(SDVariable x,
SDVariable y,
int... dimensions)
Cosine similarity pairwise reduction operation.
|
SDVariable |
cosineSimilarity(String name,
SDVariable x,
SDVariable y,
int... dimensions)
Cosine similarity pairwise reduction operation.
|
SDVariable |
countNonZero(SDVariable in,
int... dimensions)
Count non zero array reduction operation, optionally along specified dimensions: out = count(x != 0)
|
SDVariable |
countNonZero(String name,
SDVariable in,
int... dimensions)
Count non zero array reduction operation, optionally along specified dimensions: out = count(x != 0)
|
SDVariable |
countZero(SDVariable in,
int... dimensions)
Count zero array reduction operation, optionally along specified dimensions: out = count(x == 0)
|
SDVariable |
countZero(String name,
SDVariable in,
int... dimensions)
Count zero array reduction operation, optionally along specified dimensions: out = count(x == 0)
|
SDVariable |
cross(SDVariable a,
SDVariable b)
Returns the pair-wise cross product of equal size arrays a and b: a x b = ||a||x||b|| sin(theta).
Can take rank 1 or above inputs (of equal shapes), but note that the last dimension must have dimension 3 |
SDVariable |
cross(String name,
SDVariable a,
SDVariable b)
Returns the pair-wise cross product of equal size arrays a and b: a x b = ||a||x||b|| sin(theta).
Can take rank 1 or above inputs (of equal shapes), but note that the last dimension must have dimension 3 |
SDVariable |
cube(SDVariable x)
Element-wise cube function: out = x^3
|
SDVariable |
cube(String name,
SDVariable x)
Element-wise cube function: out = x^3
|
SDVariable |
diag(SDVariable x)
Returns an output variable with diagonal values equal to the specified values; off-diagonal values will be set to 0
For example, if input = [1,2,3], then output is given by: [ 1, 0, 0] [ 0, 2, 0] [ 0, 0, 3] Higher input ranks are also supported: if input has shape [a,...,R-1] then output[i,...,k,i,...,k] = input[i,...,k]. i.e., for input rank R, output has rank 2R |
SDVariable |
diag(String name,
SDVariable x)
Returns an output variable with diagonal values equal to the specified values; off-diagonal values will be set to 0
For example, if input = [1,2,3], then output is given by: [ 1, 0, 0] [ 0, 2, 0] [ 0, 0, 3] Higher input ranks are also supported: if input has shape [a,...,R-1] then output[i,...,k,i,...,k] = input[i,...,k]. i.e., for input rank R, output has rank 2R |
SDVariable |
diagPart(SDVariable x)
Extract the diagonal part from the input array.
If input is [ 1, 0, 0] [ 0, 2, 0] [ 0, 0, 3] then output is [1, 2, 3]. Supports higher dimensions: in general, out[i,...,k] = in[i,...,k,i,...,k] |
SDVariable |
diagPart(String name,
SDVariable x)
Extract the diagonal part from the input array.
If input is [ 1, 0, 0] [ 0, 2, 0] [ 0, 0, 3] then output is [1, 2, 3]. Supports higher dimensions: in general, out[i,...,k] = in[i,...,k,i,...,k] |
SDVariable |
div(SDVariable x,
double value)
Scalar division operation, out = in / scalar
|
SDVariable |
div(SDVariable x,
SDVariable y)
Pairwise division operation, out = x / y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
div(String name,
SDVariable x,
double value)
Scalar division operation, out = in / scalar
|
SDVariable |
div(String name,
SDVariable x,
SDVariable y)
Pairwise division operation, out = x / y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
embeddingLookup(SDVariable x,
SDVariable indices,
PartitionMode PartitionMode)
Looks up ids in a list of embedding tensors.
|
SDVariable |
embeddingLookup(String name,
SDVariable x,
SDVariable indices,
PartitionMode PartitionMode)
Looks up ids in a list of embedding tensors.
|
SDVariable |
entropy(SDVariable in,
int... dimensions)
Entropy reduction: -sum(x * log(x))
|
SDVariable |
entropy(String name,
SDVariable in,
int... dimensions)
Entropy reduction: -sum(x * log(x))
|
SDVariable |
erf(SDVariable x)
Element-wise Gaussian error function - out = erf(in)
|
SDVariable |
erf(String name,
SDVariable x)
Element-wise Gaussian error function - out = erf(in)
|
SDVariable |
erfc(SDVariable x)
Element-wise complementary Gaussian error function - out = erfc(in) = 1 - erf(in)
|
SDVariable |
erfc(String name,
SDVariable x)
Element-wise complementary Gaussian error function - out = erfc(in) = 1 - erf(in)
|
SDVariable |
euclideanDistance(SDVariable x,
SDVariable y,
int... dimensions)
Euclidean distance (l2 norm, l2 distance) reduction operation.
|
SDVariable |
euclideanDistance(String name,
SDVariable x,
SDVariable y,
int... dimensions)
Euclidean distance (l2 norm, l2 distance) reduction operation.
|
SDVariable |
exp(SDVariable x)
Elementwise exponent function: out = exp(x) = 2.71828...^x
|
SDVariable |
exp(String name,
SDVariable x)
Elementwise exponent function: out = exp(x) = 2.71828...^x
|
SDVariable |
expm1(SDVariable x)
Elementwise 1.0 - exponent function: out = 1.0 - exp(x) = 1.0 - 2.71828...^x
|
SDVariable |
expm1(String name,
SDVariable x)
Elementwise 1.0 - exponent function: out = 1.0 - exp(x) = 1.0 - 2.71828...^x
|
SDVariable |
eye(int rows)
Generate an identity matrix with the specified number of rows and columns.
|
SDVariable |
eye(int rows,
int cols)
As per eye(String, int, int, DataType) but with the default datatype, Eye.DEFAULT_DTYPE
|
SDVariable |
eye(int rows,
int cols,
DataType dataType,
int... dimensions)
Generate an identity matrix with the specified number of rows and columns
Example: |
SDVariable |
eye(SDVariable rows)
As per eye(String, int) but with the number of rows specified as a scalar INDArray
|
SDVariable |
eye(SDVariable rows,
SDVariable cols)
As per eye(int, int) bit with the number of rows/columns specified as scalar INDArrays
|
SDVariable |
eye(String name,
int rows)
Generate an identity matrix with the specified number of rows and columns.
|
SDVariable |
eye(String name,
int rows,
int cols)
As per eye(String, int, int, DataType) but with the default datatype, Eye.DEFAULT_DTYPE
|
SDVariable |
eye(String name,
int rows,
int cols,
DataType dataType,
int... dimensions)
Generate an identity matrix with the specified number of rows and columns
Example: |
SDVariable |
eye(String name,
SDVariable rows)
As per eye(String, int) but with the number of rows specified as a scalar INDArray
|
SDVariable |
eye(String name,
SDVariable rows,
SDVariable cols)
As per eye(int, int) bit with the number of rows/columns specified as scalar INDArrays
|
SDVariable |
firstIndex(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions)
First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
firstIndex(SDVariable in,
Condition condition,
int... dimensions)
First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
firstIndex(String name,
SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions)
First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
firstIndex(String name,
SDVariable in,
Condition condition,
int... dimensions)
First index reduction operation.
Returns a variable that contains the index of the first element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
floor(SDVariable x)
Element-wise floor function: out = floor(x).
Rounds each value down to the nearest integer value (if not already an integer) |
SDVariable |
floor(String name,
SDVariable x)
Element-wise floor function: out = floor(x).
Rounds each value down to the nearest integer value (if not already an integer) |
SDVariable |
floorDiv(SDVariable x,
SDVariable y)
Pairwise floor division operation, out = floor(x / y)
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
floorDiv(String name,
SDVariable x,
SDVariable y)
Pairwise floor division operation, out = floor(x / y)
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
floorMod(SDVariable x,
double value)
Scalar floor modulus operation
|
SDVariable |
floorMod(SDVariable x,
SDVariable y)
Pairwise Modulus division operation
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
floorMod(String name,
SDVariable x,
double value)
Scalar floor modulus operation
|
SDVariable |
floorMod(String name,
SDVariable x,
SDVariable y)
Pairwise Modulus division operation
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
hammingDistance(SDVariable x,
SDVariable y,
int... dimensions)
Hamming distance reduction operation.
|
SDVariable |
hammingDistance(String name,
SDVariable x,
SDVariable y,
int... dimensions)
Hamming distance reduction operation.
|
SDVariable |
iamax(SDVariable in,
boolean keepDims,
int... dimensions)
Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...) |
SDVariable |
iamax(SDVariable in,
int... dimensions)
Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...) |
SDVariable |
iamax(String name,
SDVariable in,
boolean keepDims,
int... dimensions)
Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...) |
SDVariable |
iamax(String name,
SDVariable in,
int... dimensions)
Index of the max absolute value: argmax(abs(in))
see argmax(String, INDArray, boolean, int...) |
SDVariable |
iamin(SDVariable in,
boolean keepDims,
int... dimensions)
Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...) |
SDVariable |
iamin(SDVariable in,
int... dimensions)
Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...) |
SDVariable |
iamin(String name,
SDVariable in,
boolean keepDims,
int... dimensions)
Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...) |
SDVariable |
iamin(String name,
SDVariable in,
int... dimensions)
Index of the min absolute value: argmin(abs(in))
see argmin(String, INDArray, boolean, int...) |
SDVariable |
isFinite(SDVariable x)
Is finite operation: elementwise isFinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isFinite(String name,
SDVariable x)
Is finite operation: elementwise isFinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isInfinite(SDVariable x)
Is infinite operation: elementwise isInfinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isInfinite(String name,
SDVariable x)
Is infinite operation: elementwise isInfinite(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isMax(SDVariable x)
Is maximum operation: elementwise x == max(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isMax(String name,
SDVariable x)
Is maximum operation: elementwise x == max(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isNaN(SDVariable x)
Is Not a Number operation: elementwise isNaN(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isNaN(String name,
SDVariable x)
Is Not a Number operation: elementwise isNaN(x)
Returns an array with the same shape/size as the input, with values 1 where condition is satisfied, or value 0 otherwise |
SDVariable |
isNonDecreasing(SDVariable x)
Is the array non decreasing?
An array is non-decreasing if for every valid i, x[i] <= x[i+1]. |
SDVariable |
isNonDecreasing(String name,
SDVariable x)
Is the array non decreasing?
An array is non-decreasing if for every valid i, x[i] <= x[i+1]. |
SDVariable |
isStrictlyIncreasing(SDVariable x)
Is the array strictly increasing?
An array is strictly increasing if for every valid i, x[i] < x[i+1]. |
SDVariable |
isStrictlyIncreasing(String name,
SDVariable x)
Is the array strictly increasing?
An array is strictly increasing if for every valid i, x[i] < x[i+1]. |
SDVariable |
jaccardDistance(SDVariable x,
SDVariable y,
int... dimensions)
Jaccard similarity reduction operation.
|
SDVariable |
jaccardDistance(String name,
SDVariable x,
SDVariable y,
int... dimensions)
Jaccard similarity reduction operation.
|
SDVariable |
lastIndex(SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions)
Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
lastIndex(SDVariable in,
Condition condition,
int... dimensions)
Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
lastIndex(String name,
SDVariable in,
Condition condition,
boolean keepDims,
int... dimensions)
Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable |
lastIndex(String name,
SDVariable in,
Condition condition,
int... dimensions)
Last index reduction operation.
Returns a variable that contains the index of the last element that matches the specified condition (for each slice along the specified dimensions) Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. |
SDVariable[] |
listDiff(SDVariable x,
SDVariable y)
Calculates difference between inputs X and Y.
|
SDVariable[] |
listDiff(String[] names,
SDVariable x,
SDVariable y)
Calculates difference between inputs X and Y.
|
SDVariable |
log(SDVariable x)
Element-wise logarithm function (base e - natural logarithm): out = log(x)
|
SDVariable |
log(SDVariable x,
double base)
Element-wise logarithm function (with specified base): out = log_{base}(x)
|
SDVariable |
log(String name,
SDVariable x)
Element-wise logarithm function (base e - natural logarithm): out = log(x)
|
SDVariable |
log(String name,
SDVariable x,
double base)
Element-wise logarithm function (with specified base): out = log_{base}(x)
|
SDVariable |
log1p(SDVariable x)
Elementwise natural logarithm function: out = log_e (1 + x)
|
SDVariable |
log1p(String name,
SDVariable x)
Elementwise natural logarithm function: out = log_e (1 + x)
|
SDVariable |
logEntropy(SDVariable in,
int... dimensions)
Log entropy reduction: log(-sum(x * log(x)))
|
SDVariable |
logEntropy(String name,
SDVariable in,
int... dimensions)
Log entropy reduction: log(-sum(x * log(x)))
|
SDVariable |
logSumExp(SDVariable input,
int... dimensions)
Log-sum-exp reduction (optionally along dimension).
Computes log(sum(exp(x)) |
SDVariable |
logSumExp(String name,
SDVariable input,
int... dimensions)
Log-sum-exp reduction (optionally along dimension).
Computes log(sum(exp(x)) |
SDVariable |
manhattanDistance(SDVariable x,
SDVariable y,
int... dimensions)
Manhattan distance (l1 norm, l1 distance) reduction operation.
|
SDVariable |
manhattanDistance(String name,
SDVariable x,
SDVariable y,
int... dimensions)
Manhattan distance (l1 norm, l1 distance) reduction operation.
|
SDVariable |
matrixDeterminant(SDVariable in)
Matrix determinant op.
|
SDVariable |
matrixDeterminant(String name,
SDVariable in)
Matrix determinant op.
|
SDVariable |
matrixInverse(SDVariable in)
Matrix inverse op.
|
SDVariable |
matrixInverse(String name,
SDVariable in)
Matrix inverse op.
|
SDVariable |
max(SDVariable x,
SDVariable y)
Pairwise max operation, out = max(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
max(String name,
SDVariable x,
SDVariable y)
Pairwise max operation, out = max(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
mergeAdd(SDVariable... inputs)
Merge add function: merges an arbitrary number of equal shaped arrays using element-wise addition:
out = sum_i in[i] |
SDVariable |
mergeAdd(String name,
SDVariable... inputs)
Merge add function: merges an arbitrary number of equal shaped arrays using element-wise addition:
out = sum_i in[i] |
SDVariable |
mergeAvg(SDVariable... inputs)
Merge average function: merges an arbitrary number of equal shaped arrays using element-wise mean operation:
out = mean_i in[i] |
SDVariable |
mergeAvg(String name,
SDVariable... inputs)
Merge average function: merges an arbitrary number of equal shaped arrays using element-wise mean operation:
out = mean_i in[i] |
SDVariable |
mergeMax(SDVariable... inputs)
Merge max function: merges an arbitrary number of equal shaped arrays using element-wise maximum operation:
out = max_i in[i] |
SDVariable |
mergeMax(String name,
SDVariable... inputs)
Merge max function: merges an arbitrary number of equal shaped arrays using element-wise maximum operation:
out = max_i in[i] |
SDVariable |
mergeMaxIndex(SDVariable... x)
Return array of max elements indices with along tensor dimensions
|
SDVariable |
mergeMaxIndex(SDVariable[] x,
DataType dataType)
Return array of max elements indices with along tensor dimensions
|
SDVariable |
mergeMaxIndex(String name,
SDVariable... x)
Return array of max elements indices with along tensor dimensions
|
SDVariable |
mergeMaxIndex(String name,
SDVariable[] x,
DataType dataType)
Return array of max elements indices with along tensor dimensions
|
SDVariable[] |
meshgrid(SDVariable[] inputs,
boolean cartesian)
Broadcasts parameters for evaluation on an N-D grid.
|
SDVariable[] |
meshgrid(String[] names,
SDVariable[] inputs,
boolean cartesian)
Broadcasts parameters for evaluation on an N-D grid.
|
SDVariable |
min(SDVariable x,
SDVariable y)
Pairwise max operation, out = min(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
min(String name,
SDVariable x,
SDVariable y)
Pairwise max operation, out = min(x, y)
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
mod(SDVariable x,
SDVariable y)
Pairwise modulus (remainder) operation, out = x % y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
mod(String name,
SDVariable x,
SDVariable y)
Pairwise modulus (remainder) operation, out = x % y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable[] |
moments(SDVariable input,
int... axes)
Calculate the mean and (population) variance for the input variable, for the specified axis
|
SDVariable[] |
moments(String[] names,
SDVariable input,
int... axes)
Calculate the mean and (population) variance for the input variable, for the specified axis
|
SDVariable |
mul(SDVariable x,
double value)
Scalar multiplication operation, out = in * scalar
|
SDVariable |
mul(SDVariable x,
SDVariable y)
Pairwise multiplication operation, out = x * y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
mul(String name,
SDVariable x,
double value)
Scalar multiplication operation, out = in * scalar
|
SDVariable |
mul(String name,
SDVariable x,
SDVariable y)
Pairwise multiplication operation, out = x * y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
neg(SDVariable x)
Elementwise negative operation: out = -x
|
SDVariable |
neg(String name,
SDVariable x)
Elementwise negative operation: out = -x
|
SDVariable[] |
normalizeMoments(SDVariable counts,
SDVariable means,
SDVariable variances,
double shift)
Calculate the mean and variance from the sufficient statistics
|
SDVariable[] |
normalizeMoments(String[] names,
SDVariable counts,
SDVariable means,
SDVariable variances,
double shift)
Calculate the mean and variance from the sufficient statistics
|
SDVariable |
or(SDVariable x,
SDVariable y)
Boolean OR operation: elementwise (x != 0) || (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs. Note: supports broadcasting if x and y have different shapes and are broadcastable. Returns an array with values 1 where condition is satisfied, or value 0 otherwise. |
SDVariable |
or(String name,
SDVariable x,
SDVariable y)
Boolean OR operation: elementwise (x != 0) || (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs. Note: supports broadcasting if x and y have different shapes and are broadcastable. Returns an array with values 1 where condition is satisfied, or value 0 otherwise. |
SDVariable |
pow(SDVariable x,
double value)
Element-wise power function: out = x^value
|
SDVariable |
pow(SDVariable x,
SDVariable y)
Element-wise (broadcastable) power function: out = x[i]^y[i]
|
SDVariable |
pow(String name,
SDVariable x,
double value)
Element-wise power function: out = x^value
|
SDVariable |
pow(String name,
SDVariable x,
SDVariable y)
Element-wise (broadcastable) power function: out = x[i]^y[i]
|
SDVariable |
rationalTanh(SDVariable x)
Rational Tanh Approximation elementwise function, as described in the paper:
Compact Convolutional Neural Network Cascade for Face Detection This is a faster Tanh approximation |
SDVariable |
rationalTanh(String name,
SDVariable x)
Rational Tanh Approximation elementwise function, as described in the paper:
Compact Convolutional Neural Network Cascade for Face Detection This is a faster Tanh approximation |
SDVariable |
rdiv(SDVariable x,
double value)
Scalar reverse division operation, out = scalar / in
|
SDVariable |
rdiv(SDVariable x,
SDVariable y)
Pairwise reverse division operation, out = y / x
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
rdiv(String name,
SDVariable x,
double value)
Scalar reverse division operation, out = scalar / in
|
SDVariable |
rdiv(String name,
SDVariable x,
SDVariable y)
Pairwise reverse division operation, out = y / x
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
reciprocal(SDVariable x)
Element-wise reciprocal (inverse) function: out[i] = 1 / in[i]
|
SDVariable |
reciprocal(String name,
SDVariable x)
Element-wise reciprocal (inverse) function: out[i] = 1 / in[i]
|
SDVariable |
rectifiedTanh(SDVariable x)
Rectified tanh operation: max(0, tanh(in))
|
SDVariable |
rectifiedTanh(String name,
SDVariable x)
Rectified tanh operation: max(0, tanh(in))
|
SDVariable |
round(SDVariable x)
Element-wise round function: out = round(x).
Rounds (up or down depending on value) to the nearest integer value. |
SDVariable |
round(String name,
SDVariable x)
Element-wise round function: out = round(x).
Rounds (up or down depending on value) to the nearest integer value. |
SDVariable |
rsqrt(SDVariable x)
Element-wise reciprocal (inverse) of square root: out = 1.0 / sqrt(x)
|
SDVariable |
rsqrt(String name,
SDVariable x)
Element-wise reciprocal (inverse) of square root: out = 1.0 / sqrt(x)
|
SDVariable |
rsub(SDVariable x,
double value)
Scalar reverse subtraction operation, out = scalar - in
|
SDVariable |
rsub(SDVariable x,
SDVariable y)
Pairwise reverse subtraction operation, out = y - x
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
rsub(String name,
SDVariable x,
double value)
Scalar reverse subtraction operation, out = scalar - in
|
SDVariable |
rsub(String name,
SDVariable x,
SDVariable y)
Pairwise reverse subtraction operation, out = y - x
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
setDiag(SDVariable in,
SDVariable diag)
Set the diagonal value to the specified values
If input is [ a, b, c] [ d, e, f] [ g, h, i] and diag = [ 1, 2, 3] then output is [ 1, b, c] [ d, 2, f] [ g, h, 3] |
SDVariable |
setDiag(String name,
SDVariable in,
SDVariable diag)
Set the diagonal value to the specified values
If input is [ a, b, c] [ d, e, f] [ g, h, i] and diag = [ 1, 2, 3] then output is [ 1, b, c] [ d, 2, f] [ g, h, 3] |
SDVariable |
shannonEntropy(SDVariable in,
int... dimensions)
Shannon Entropy reduction: -sum(x * log2(x))
|
SDVariable |
shannonEntropy(String name,
SDVariable in,
int... dimensions)
Shannon Entropy reduction: -sum(x * log2(x))
|
SDVariable |
sign(SDVariable x)
Element-wise sign (signum) function:
out = -1 if in < 0 out = 0 if in = 0 out = 1 if in > 0 |
SDVariable |
sign(String name,
SDVariable x)
Element-wise sign (signum) function:
out = -1 if in < 0 out = 0 if in = 0 out = 1 if in > 0 |
SDVariable |
sin(SDVariable x)
Elementwise sine operation: out = sin(x)
|
SDVariable |
sin(String name,
SDVariable x)
Elementwise sine operation: out = sin(x)
|
SDVariable |
sinh(SDVariable x)
Elementwise sinh (hyperbolic sine) operation: out = sinh(x)
|
SDVariable |
sinh(String name,
SDVariable x)
Elementwise sinh (hyperbolic sine) operation: out = sinh(x)
|
SDVariable |
sqrt(SDVariable x)
Element-wise square root function: out = sqrt(x)
|
SDVariable |
sqrt(String name,
SDVariable x)
Element-wise square root function: out = sqrt(x)
|
SDVariable |
square(SDVariable x)
Element-wise square function: out = x^2
|
SDVariable |
square(String name,
SDVariable x)
Element-wise square function: out = x^2
|
SDVariable |
squaredDifference(SDVariable x,
SDVariable y)
Pairwise squared difference operation.
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
squaredDifference(String name,
SDVariable x,
SDVariable y)
Pairwise squared difference operation.
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
standardize(SDVariable x,
int... dimensions)
Standardize input variable along given axis
|
SDVariable |
standardize(String name,
SDVariable x,
int... dimensions)
Standardize input variable along given axis
|
SDVariable |
step(SDVariable x,
double value)
Elementwise step function:
out(x) = 1 if x >= cutoff out(x) = 0 otherwise |
SDVariable |
step(String name,
SDVariable x,
double value)
Elementwise step function:
out(x) = 1 if x >= cutoff out(x) = 0 otherwise |
SDVariable |
sub(SDVariable x,
double value)
Scalar subtraction operation, out = in - scalar
|
SDVariable |
sub(SDVariable x,
SDVariable y)
Pairwise subtraction operation, out = x - y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
sub(String name,
SDVariable x,
double value)
Scalar subtraction operation, out = in - scalar
|
SDVariable |
sub(String name,
SDVariable x,
SDVariable y)
Pairwise subtraction operation, out = x - y
Note: supports broadcasting if x and y have different shapes and are broadcastable. For example, if X has shape [1,10] and Y has shape [5,10] then op(X,Y) has output shape [5,10] Broadcast rules are the same as NumPy: https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html |
SDVariable |
tan(SDVariable x)
Elementwise tangent operation: out = tan(x)
|
SDVariable |
tan(String name,
SDVariable x)
Elementwise tangent operation: out = tan(x)
|
SDVariable |
tanh(SDVariable x)
Elementwise tanh (hyperbolic tangent) operation: out = tanh(x)
|
SDVariable |
tanh(String name,
SDVariable x)
Elementwise tanh (hyperbolic tangent) operation: out = tanh(x)
|
SDVariable |
trace(SDVariable in)
Matrix trace operation
For rank 2 matrices, the output is a scalar vith the trace - i.e., sum of the main diagonal. For higher rank inputs, output[a,b,c] = trace(in[a,b,c,:,:]) |
SDVariable |
trace(String name,
SDVariable in)
Matrix trace operation
For rank 2 matrices, the output is a scalar vith the trace - i.e., sum of the main diagonal. For higher rank inputs, output[a,b,c] = trace(in[a,b,c,:,:]) |
SDVariable |
xor(SDVariable x,
SDVariable y)
Boolean XOR (exclusive OR) operation: elementwise (x != 0) XOR (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs. Note: supports broadcasting if x and y have different shapes and are broadcastable. Returns an array with values 1 where condition is satisfied, or value 0 otherwise. |
SDVariable |
xor(String name,
SDVariable x,
SDVariable y)
Boolean XOR (exclusive OR) operation: elementwise (x != 0) XOR (y != 0)
If x and y arrays have equal shape, the output shape is the same as these inputs. Note: supports broadcasting if x and y have different shapes and are broadcastable. Returns an array with values 1 where condition is satisfied, or value 0 otherwise. |
SDVariable |
zeroFraction(SDVariable input)
Full array zero fraction array reduction operation, optionally along specified dimensions: out = (count(x == 0) / length(x))
|
SDVariable |
zeroFraction(String name,
SDVariable input)
Full array zero fraction array reduction operation, optionally along specified dimensions: out = (count(x == 0) / length(x))
|
public SDMath(SameDiff sameDiff)
public SDVariable clipByAvgNorm(SDVariable x, double clipValue, int... dimensions)
x
- Input variable (NUMERIC type)clipValue
- Value for clippingdimensions
- Dimensions to reduce over (Size: AtLeast(min=0))public SDVariable clipByAvgNorm(String name, SDVariable x, double clipValue, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)clipValue
- Value for clippingdimensions
- Dimensions to reduce over (Size: AtLeast(min=0))public SDVariable embeddingLookup(SDVariable x, SDVariable indices, PartitionMode PartitionMode)
x
- Input tensor (NUMERIC type)indices
- A Tensor containing the ids to be looked up. (INT type)PartitionMode
- partition_mode == 0 - i.e. 'mod' , 1 - 'div'public SDVariable embeddingLookup(String name, SDVariable x, SDVariable indices, PartitionMode PartitionMode)
name
- name May be null. Name for the output variablex
- Input tensor (NUMERIC type)indices
- A Tensor containing the ids to be looked up. (INT type)PartitionMode
- partition_mode == 0 - i.e. 'mod' , 1 - 'div'public SDVariable mergeMaxIndex(SDVariable[] x, DataType dataType)
x
- Input tensor (NUMERIC type)dataType
- Data typepublic SDVariable mergeMaxIndex(String name, SDVariable[] x, DataType dataType)
name
- name May be null. Name for the output variablex
- Input tensor (NUMERIC type)dataType
- Data typepublic SDVariable mergeMaxIndex(SDVariable... x)
x
- Input tensor (NUMERIC type)public SDVariable mergeMaxIndex(String name, SDVariable... x)
name
- name May be null. Name for the output variablex
- Input tensor (NUMERIC type)public SDVariable abs(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable abs(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable acos(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable acos(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable acosh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable acosh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable add(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable add(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable add(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable add(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable amax(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable amax(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable amean(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable amean(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable amin(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable amin(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable and(SDVariable x, SDVariable y)
x
- Input 1 (BOOL type)y
- Input 2 (BOOL type)public SDVariable and(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input 1 (BOOL type)y
- Input 2 (BOOL type)public SDVariable asin(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable asin(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable asinh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable asinh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable asum(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable asum(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable atan(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable atan(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable atan2(SDVariable y, SDVariable x)
y
- Input Y variable (NUMERIC type)x
- Input X variable (NUMERIC type)public SDVariable atan2(String name, SDVariable y, SDVariable x)
name
- name May be null. Name for the output variabley
- Input Y variable (NUMERIC type)x
- Input X variable (NUMERIC type)public SDVariable atanh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable atanh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable bitShift(SDVariable x, SDVariable shift)
x
- input (NUMERIC type)shift
- shift value (NUMERIC type)public SDVariable bitShift(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- input (NUMERIC type)shift
- shift value (NUMERIC type)public SDVariable bitShiftRight(SDVariable x, SDVariable shift)
x
- Input tensor (NUMERIC type)shift
- shift argument (NUMERIC type)public SDVariable bitShiftRight(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input tensor (NUMERIC type)shift
- shift argument (NUMERIC type)public SDVariable bitShiftRotl(SDVariable x, SDVariable shift)
x
- Input tensor (NUMERIC type)shift
- shift argy=ument (NUMERIC type)public SDVariable bitShiftRotl(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input tensor (NUMERIC type)shift
- shift argy=ument (NUMERIC type)public SDVariable bitShiftRotr(SDVariable x, SDVariable shift)
x
- Input tensor (NUMERIC type)shift
- Shift argument (NUMERIC type)public SDVariable bitShiftRotr(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input tensor (NUMERIC type)shift
- Shift argument (NUMERIC type)public SDVariable ceil(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable ceil(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable clipByNorm(SDVariable x, double clipValue, int... dimensions)
x
- Input variable (NUMERIC type)clipValue
- Clipping value (maximum l2 norm)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable clipByNorm(String name, SDVariable x, double clipValue, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)clipValue
- Clipping value (maximum l2 norm)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable clipByValue(SDVariable x, double clipValueMin, double clipValueMax)
x
- Input variable (NUMERIC type)clipValueMin
- Minimum value for clippingclipValueMax
- Maximum value for clippingpublic SDVariable clipByValue(String name, SDVariable x, double clipValueMin, double clipValueMax)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)clipValueMin
- Minimum value for clippingclipValueMax
- Maximum value for clippingpublic SDVariable confusionMatrix(SDVariable labels, SDVariable pred, DataType dataType)
labels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)dataType
- Data typepublic SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, DataType dataType)
name
- name May be null. Name for the output variablelabels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)dataType
- Data typepublic SDVariable confusionMatrix(SDVariable labels, SDVariable pred, int numClasses)
labels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)numClasses
- Number of classespublic SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, int numClasses)
name
- name May be null. Name for the output variablelabels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)numClasses
- Number of classespublic SDVariable confusionMatrix(SDVariable labels, SDVariable pred, SDVariable weights)
labels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)weights
- Weights - 1D array of values (may be real/decimal) representing the weight/contribution of each prediction. Must be same length as both labels and predictions arrays (NUMERIC type)public SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, SDVariable weights)
name
- name May be null. Name for the output variablelabels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)weights
- Weights - 1D array of values (may be real/decimal) representing the weight/contribution of each prediction. Must be same length as both labels and predictions arrays (NUMERIC type)public SDVariable confusionMatrix(SDVariable labels, SDVariable pred, SDVariable weights, int numClasses)
labels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)weights
- Weights - 1D array of values (may be real/decimal) representing the weight/contribution of each prediction. Must be same length as both labels and predictions arrays (NUMERIC type)numClasses
- public SDVariable confusionMatrix(String name, SDVariable labels, SDVariable pred, SDVariable weights, int numClasses)
name
- name May be null. Name for the output variablelabels
- Labels - 1D array of integer values representing label values (NUMERIC type)pred
- Predictions - 1D array of integer values representing predictions. Same length as labels (NUMERIC type)weights
- Weights - 1D array of values (may be real/decimal) representing the weight/contribution of each prediction. Must be same length as both labels and predictions arrays (NUMERIC type)numClasses
- public SDVariable cos(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable cos(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable cosh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable cosh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable cosineDistance(SDVariable x, SDVariable y, int... dimensions)
x
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate cosineDistance over (Size: AtLeast(min=0))public SDVariable cosineDistance(String name, SDVariable x, SDVariable y, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate cosineDistance over (Size: AtLeast(min=0))public SDVariable cosineSimilarity(SDVariable x, SDVariable y, int... dimensions)
x
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate cosineSimilarity over (Size: AtLeast(min=0))public SDVariable cosineSimilarity(String name, SDVariable x, SDVariable y, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate cosineSimilarity over (Size: AtLeast(min=0))public SDVariable countNonZero(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable countNonZero(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable countZero(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable countZero(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable cross(SDVariable a, SDVariable b)
a
- First input (NUMERIC type)b
- Second input (NUMERIC type)public SDVariable cross(String name, SDVariable a, SDVariable b)
name
- name May be null. Name for the output variablea
- First input (NUMERIC type)b
- Second input (NUMERIC type)public SDVariable cube(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable cube(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable diag(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable diag(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable diagPart(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable diagPart(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable div(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable div(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable div(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable div(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable entropy(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable entropy(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable erf(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable erf(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable erfc(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable erfc(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable euclideanDistance(SDVariable x, SDVariable y, int... dimensions)
x
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate euclideanDistance over (Size: AtLeast(min=0))public SDVariable euclideanDistance(String name, SDVariable x, SDVariable y, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate euclideanDistance over (Size: AtLeast(min=0))public SDVariable exp(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable exp(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable expm1(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable expm1(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable eye(int rows)
rows
- Number of rowspublic SDVariable eye(String name, int rows)
name
- name May be null. Name for the output variablerows
- Number of rowspublic SDVariable eye(int rows, int cols)
rows
- Number of rowscols
- Number of columnspublic SDVariable eye(String name, int rows, int cols)
name
- name May be null. Name for the output variablerows
- Number of rowscols
- Number of columnspublic SDVariable eye(int rows, int cols, DataType dataType, int... dimensions)
INDArray eye = eye(3,2)<br> eye:<br> [ 1, 0]<br> [ 0, 1]<br> [ 0, 0]
rows
- Number of rowscols
- Number of columnsdataType
- Data typedimensions
- (Size: AtLeast(min=0))public SDVariable eye(String name, int rows, int cols, DataType dataType, int... dimensions)
INDArray eye = eye(3,2)<br> eye:<br> [ 1, 0]<br> [ 0, 1]<br> [ 0, 0]
name
- name May be null. Name for the output variablerows
- Number of rowscols
- Number of columnsdataType
- Data typedimensions
- (Size: AtLeast(min=0))public SDVariable eye(SDVariable rows, SDVariable cols)
rows
- Number of rows (INT type)cols
- Number of columns (INT type)public SDVariable eye(String name, SDVariable rows, SDVariable cols)
name
- name May be null. Name for the output variablerows
- Number of rows (INT type)cols
- Number of columns (INT type)public SDVariable eye(SDVariable rows)
rows
- Number of rows (INT type)public SDVariable eye(String name, SDVariable rows)
name
- name May be null. Name for the output variablerows
- Number of rows (INT type)public SDVariable firstIndex(SDVariable in, Condition condition, int... dimensions)
in
- Input variable (NUMERIC type)condition
- Condition to check on input variabledimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable firstIndex(String name, SDVariable in, Condition condition, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)condition
- Condition to check on input variabledimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable firstIndex(SDVariable in, Condition condition, boolean keepDims, int... dimensions)
in
- Input variable (NUMERIC type)condition
- Condition to check on input variablekeepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable firstIndex(String name, SDVariable in, Condition condition, boolean keepDims, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)condition
- Condition to check on input variablekeepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable floor(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable floor(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable floorDiv(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable floorDiv(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable floorMod(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable floorMod(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable floorMod(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable floorMod(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable hammingDistance(SDVariable x, SDVariable y, int... dimensions)
x
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate hammingDistance over (Size: AtLeast(min=0))public SDVariable hammingDistance(String name, SDVariable x, SDVariable y, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate hammingDistance over (Size: AtLeast(min=0))public SDVariable iamax(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamax(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamax(SDVariable in, boolean keepDims, int... dimensions)
in
- Input variable (NUMERIC type)keepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamax(String name, SDVariable in, boolean keepDims, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)keepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamin(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamin(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamin(SDVariable in, boolean keepDims, int... dimensions)
in
- Input variable (NUMERIC type)keepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable iamin(String name, SDVariable in, boolean keepDims, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)keepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable isFinite(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable isFinite(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable isInfinite(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable isInfinite(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable isMax(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable isMax(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable isNaN(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable isNaN(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable isNonDecreasing(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable isNonDecreasing(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable isStrictlyIncreasing(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable isStrictlyIncreasing(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable jaccardDistance(SDVariable x, SDVariable y, int... dimensions)
x
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate jaccardDistance over (Size: AtLeast(min=0))public SDVariable jaccardDistance(String name, SDVariable x, SDVariable y, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate jaccardDistance over (Size: AtLeast(min=0))public SDVariable lastIndex(SDVariable in, Condition condition, int... dimensions)
in
- Input variable (NUMERIC type)condition
- Condition to check on input variabledimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable lastIndex(String name, SDVariable in, Condition condition, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)condition
- Condition to check on input variabledimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable lastIndex(SDVariable in, Condition condition, boolean keepDims, int... dimensions)
in
- Input variable (NUMERIC type)condition
- Condition to check on input variablekeepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable lastIndex(String name, SDVariable in, Condition condition, boolean keepDims, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)condition
- Condition to check on input variablekeepDims
- If true: keep the dimensions that are reduced on (as length 1). False: remove the reduction dimensionsdimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=1))public SDVariable[] listDiff(SDVariable x, SDVariable y)
x
- Input variable X (NUMERIC type)y
- Input variable Y (NUMERIC type)public SDVariable[] listDiff(String[] names, SDVariable x, SDVariable y)
names
- names May be null. Arrays of names for the output variables.x
- Input variable X (NUMERIC type)y
- Input variable Y (NUMERIC type)public SDVariable log(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable log(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable log(SDVariable x, double base)
x
- Input variable (NUMERIC type)base
- Logarithm basepublic SDVariable log(String name, SDVariable x, double base)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)base
- Logarithm basepublic SDVariable log1p(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable log1p(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable logEntropy(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable logEntropy(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable logSumExp(SDVariable input, int... dimensions)
input
- Input variable (NUMERIC type)dimensions
- Optional dimensions to reduce along (Size: AtLeast(min=0))public SDVariable logSumExp(String name, SDVariable input, int... dimensions)
name
- name May be null. Name for the output variableinput
- Input variable (NUMERIC type)dimensions
- Optional dimensions to reduce along (Size: AtLeast(min=0))public SDVariable manhattanDistance(SDVariable x, SDVariable y, int... dimensions)
x
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate manhattanDistance over (Size: AtLeast(min=0))public SDVariable manhattanDistance(String name, SDVariable x, SDVariable y, int... dimensions)
name
- name May be null. Name for the output variablex
- Input variable x (NUMERIC type)y
- Input variable y (NUMERIC type)dimensions
- Dimensions to calculate manhattanDistance over (Size: AtLeast(min=0))public SDVariable matrixDeterminant(SDVariable in)
in
- Input (NUMERIC type)public SDVariable matrixDeterminant(String name, SDVariable in)
name
- name May be null. Name for the output variablein
- Input (NUMERIC type)public SDVariable matrixInverse(SDVariable in)
in
- Input (NUMERIC type)public SDVariable matrixInverse(String name, SDVariable in)
name
- name May be null. Name for the output variablein
- Input (NUMERIC type)public SDVariable max(SDVariable x, SDVariable y)
x
- First input variable, x (NUMERIC type)y
- Second input variable, y (NUMERIC type)public SDVariable max(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- First input variable, x (NUMERIC type)y
- Second input variable, y (NUMERIC type)public SDVariable mergeAdd(SDVariable... inputs)
inputs
- Input variables (NUMERIC type)public SDVariable mergeAdd(String name, SDVariable... inputs)
name
- name May be null. Name for the output variableinputs
- Input variables (NUMERIC type)public SDVariable mergeAvg(SDVariable... inputs)
inputs
- Input variables (NUMERIC type)public SDVariable mergeAvg(String name, SDVariable... inputs)
name
- name May be null. Name for the output variableinputs
- Input variables (NUMERIC type)public SDVariable mergeMax(SDVariable... inputs)
inputs
- Input variables (NUMERIC type)public SDVariable mergeMax(String name, SDVariable... inputs)
name
- name May be null. Name for the output variableinputs
- Input variables (NUMERIC type)public SDVariable[] meshgrid(SDVariable[] inputs, boolean cartesian)
inputs
- (NUMERIC type)cartesian
- public SDVariable[] meshgrid(String[] names, SDVariable[] inputs, boolean cartesian)
names
- names May be null. Arrays of names for the output variables.inputs
- (NUMERIC type)cartesian
- public SDVariable min(SDVariable x, SDVariable y)
x
- First input variable, x (NUMERIC type)y
- Second input variable, y (NUMERIC type)public SDVariable min(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- First input variable, x (NUMERIC type)y
- Second input variable, y (NUMERIC type)public SDVariable mod(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable mod(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable[] moments(SDVariable input, int... axes)
input
- Input to calculate moments for (NUMERIC type)axes
- Dimensions to perform calculation over (Size: AtLeast(min=0))public SDVariable[] moments(String[] names, SDVariable input, int... axes)
names
- names May be null. Arrays of names for the output variables.input
- Input to calculate moments for (NUMERIC type)axes
- Dimensions to perform calculation over (Size: AtLeast(min=0))public SDVariable mul(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable mul(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable mul(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable mul(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable neg(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable neg(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable[] normalizeMoments(SDVariable counts, SDVariable means, SDVariable variances, double shift)
counts
- Rank 0 (scalar) value with the total number of values used to calculate the sufficient statistics (NUMERIC type)means
- Mean-value sufficient statistics: this is the SUM of all data values (NUMERIC type)variances
- Variaance sufficient statistics: this is the squared sum of all data values (NUMERIC type)shift
- Shift value, possibly 0, used when calculating the sufficient statistics (for numerical stability)public SDVariable[] normalizeMoments(String[] names, SDVariable counts, SDVariable means, SDVariable variances, double shift)
names
- names May be null. Arrays of names for the output variables.counts
- Rank 0 (scalar) value with the total number of values used to calculate the sufficient statistics (NUMERIC type)means
- Mean-value sufficient statistics: this is the SUM of all data values (NUMERIC type)variances
- Variaance sufficient statistics: this is the squared sum of all data values (NUMERIC type)shift
- Shift value, possibly 0, used when calculating the sufficient statistics (for numerical stability)public SDVariable or(SDVariable x, SDVariable y)
x
- Input 1 (BOOL type)y
- Input 2 (BOOL type)public SDVariable or(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input 1 (BOOL type)y
- Input 2 (BOOL type)public SDVariable pow(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable pow(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable pow(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Power (NUMERIC type)public SDVariable pow(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Power (NUMERIC type)public SDVariable rationalTanh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable rationalTanh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable rdiv(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable rdiv(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable rdiv(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable rdiv(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable reciprocal(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable reciprocal(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable rectifiedTanh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable rectifiedTanh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable round(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable round(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable rsqrt(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable rsqrt(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable rsub(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable rsub(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable rsub(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable rsub(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable setDiag(SDVariable in, SDVariable diag)
in
- Input variable (NUMERIC type)diag
- Diagonal (NUMERIC type)public SDVariable setDiag(String name, SDVariable in, SDVariable diag)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)diag
- Diagonal (NUMERIC type)public SDVariable shannonEntropy(SDVariable in, int... dimensions)
in
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable shannonEntropy(String name, SDVariable in, int... dimensions)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)dimensions
- Dimensions to reduce over. If dimensions are not specified, full array reduction is performed (Size: AtLeast(min=0))public SDVariable sign(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable sign(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable sin(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable sin(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable sinh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable sinh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable sqrt(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable sqrt(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable square(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable square(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable squaredDifference(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable squaredDifference(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable standardize(SDVariable x, int... dimensions)
out = (x - mean) / stdev
with mean and stdev being calculated along the given dimension.
For example: given x as a mini batch of the shape [numExamples, exampleLength]:
x
- Input variable (NUMERIC type)dimensions
- (Size: AtLeast(min=1))public SDVariable standardize(String name, SDVariable x, int... dimensions)
out = (x - mean) / stdev
with mean and stdev being calculated along the given dimension.
For example: given x as a mini batch of the shape [numExamples, exampleLength]:
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)dimensions
- (Size: AtLeast(min=1))public SDVariable step(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable step(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable sub(SDVariable x, SDVariable y)
x
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable sub(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)y
- Input variable (NUMERIC type)public SDVariable sub(SDVariable x, double value)
x
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable sub(String name, SDVariable x, double value)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)value
- Scalar value for oppublic SDVariable tan(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable tan(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable tanh(SDVariable x)
x
- Input variable (NUMERIC type)public SDVariable tanh(String name, SDVariable x)
name
- name May be null. Name for the output variablex
- Input variable (NUMERIC type)public SDVariable trace(SDVariable in)
in
- Input variable (NUMERIC type)public SDVariable trace(String name, SDVariable in)
name
- name May be null. Name for the output variablein
- Input variable (NUMERIC type)public SDVariable xor(SDVariable x, SDVariable y)
x
- Input 1 (BOOL type)y
- Input 2 (BOOL type)public SDVariable xor(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input 1 (BOOL type)y
- Input 2 (BOOL type)public SDVariable zeroFraction(SDVariable input)
input
- Input variable (NUMERIC type)public SDVariable zeroFraction(String name, SDVariable input)
name
- name May be null. Name for the output variableinput
- Input variable (NUMERIC type)Copyright © 2020. All rights reserved.