T
- data type for output()
output@Operator(group="nn") public final class AvgPool<T extends Number> extends PrimitiveOp implements Operand<T>
Each entry in `output` is the mean of the corresponding size `ksize` window in `value`.
Modifier and Type | Class and Description |
---|---|
static class |
AvgPool.Options
Optional attributes for
AvgPool |
operation
Modifier and Type | Method and Description |
---|---|
Output<T> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T extends Number> |
create(Scope scope,
Operand<T> value,
List<Long> ksize,
List<Long> strides,
String padding,
AvgPool.Options... options)
Factory method to create a class wrapping a new AvgPool operation.
|
static AvgPool.Options |
dataFormat(String dataFormat) |
Output<T> |
output()
The average pooled output tensor.
|
equals, hashCode, op, toString
public static <T extends Number> AvgPool<T> create(Scope scope, Operand<T> value, List<Long> ksize, List<Long> strides, String padding, AvgPool.Options... options)
scope
- current scopevalue
- 4-D with shape `[batch, height, width, channels]`.ksize
- The size of the sliding window for each dimension of `value`.strides
- The stride of the sliding window for each dimension of `value`.padding
- The type of padding algorithm to use.options
- carries optional attributes valuespublic static AvgPool.Options dataFormat(String dataFormat)
dataFormat
- Specify the data format of the input and output data. With the
default format "NHWC", the data is stored in the order of:
[batch, in_height, in_width, in_channels].
Alternatively, the format could be "NCHW", the data storage order of:
[batch, in_channels, in_height, in_width].public Output<T> asOutput()
Operand
Inputs 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 extends Number>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.