T - data type for output() output@Operator(group="math") public final class Mean<T> extends PrimitiveOp implements Operand<T>
Reduces `input` along the dimensions given in `axis`. Unless `keep_dims` is true, the rank of the tensor is reduced by 1 for each entry in `axis`. If `keep_dims` is true, the reduced dimensions are retained with length 1.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Mean.Options |
Optional attributes for
Mean |
operation| Modifier and Type | Method | Description |
|---|---|---|
Output<T> |
asOutput() |
Returns the symbolic handle of a tensor.
|
static <T,U extends java.lang.Number> |
create(Scope scope,
Operand<T> input,
Operand<U> axis,
Mean.Options... options) |
Factory method to create a class to wrap a new Mean operation to the graph.
|
static Mean.Options |
keepDims(java.lang.Boolean keepDims) |
|
Output<T> |
output() |
The reduced tensor.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, hashCode, toStringpublic static <T,U extends java.lang.Number> Mean<T> create(Scope scope, Operand<T> input, Operand<U> axis, Mean.Options... options)
scope - current graph scopeinput - The tensor to reduce.axis - The dimensions to reduce. Must be in the range
`[-rank(input), rank(input))`.options - carries optional attributes valuespublic static Mean.Options keepDims(java.lang.Boolean keepDims)
keepDims - If true, retain reduced dimensions with length 1.public Output<T> asOutput()
OperandInputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput in interface Operand<T>OperationBuilder.addInput(Output)