Methods
# inner maxValue(tensor, axis) → {Tensor}
Computes the maximum of elements across dimensions of a tf.Tensor.
Parameters:
Name | Type | Description |
---|---|---|
tensor |
Tensor
|
The input tensor. |
axis |
Number
|
Array.<Number>
|
The dimension(s) to reduce. By default it reduces all dimensions. |
tf.max(tensor, axis)
Tensor
# inner maxValueIndex(tensor, axis) → {Tensor}
Returns the indices of the maximum values along an axis.
Parameters:
Name | Type | Description |
---|---|---|
tensor |
Tensor
|
The input tensor. |
axis |
Number
|
Array.<Number>
|
The dimension to reduce. Defaults to 0 (outer-most dimension). |
tf.argMax(tensor, axis)
Tensor
# inner reduceMean(tensor, axis, keepDims) → {Tensor}
Computes the mean of elements across dimensions of a tf.Tensor.
Parameters:
Name | Type | Description |
---|---|---|
tensor |
Tensor
|
The input tensor. |
axis |
Number
|
Array.<Number>
|
The dimension(s) to reduce. By default it reduces all dimensions. |
keepDims |
Boolean
|
If true, retains reduced dimensions with size 1. |
tf.mean(tensor, axis, keepDims)
Tensor
# inner reduceProd(tensor, axis) → {Tensor}
Computes the product of elements across dimensions of a tf.Tensor.
Parameters:
Name | Type | Description |
---|---|---|
tensor |
Tensor
|
The input tensor to compute the product over. If the dtype is bool it will be converted to int32 and the output dtype will be int32. |
axis |
Number
|
Array.<Number>
|
The dimension(s) to reduce. By default it reduces all dimensions. |
tf.prod(tensor, axis)
Tensor
# inner reduceSum(tensor, axis, keepDims) → {Tensor}
Computes the sum of elements across dimensions of a tf.Tensor.
Parameters:
Name | Type | Description |
---|---|---|
tensor |
Tensor
|
The input tensor to compute the sum over. If the dtype is bool it will be converted to int32 and the output dtype will be int32. |
axis |
Number
|
Array.<Number>
|
The dimension(s) to reduce. By default it reduces all dimensions. |
keepDims |
Boolean
|
If true, retains reduced dimensions with size 1. |
tf.sum(tensor, axis, keepDims)
Tensor