T - data type for output() outputU - data type for argmax() output@Operator public final class MaxPoolWithArgmax<T extends Number,U extends Number> extends PrimitiveOp
The indices in `argmax` are flattened, so that a maximum value at position `[b, y, x, c]` becomes flattened index `((b * height + y) * width + x) * channels + c`.
The indices returned are always in `[0, height) x [0, width)` before flattening, even if padding is involved and the mathematically correct answer is outside (either negative or too large). This is a bug, but fixing it is difficult to do in a safe backwards compatible way, especially due to flattening.
operation| Modifier and Type | Method and Description |
|---|---|
Output<U> |
argmax()
4-D.
|
static <T extends Number,U extends Number> |
create(Scope scope,
Operand<T> input,
List<Long> ksize,
List<Long> strides,
Class<U> Targmax,
String padding)
Factory method to create a class to wrap a new MaxPoolWithArgmax operation to the graph.
|
static <T extends Number> |
create(Scope scope,
Operand<T> input,
List<Long> ksize,
List<Long> strides,
String padding)
Factory method to create a class to wrap a new MaxPoolWithArgmax operation to the graph, using default output types.
|
Output<T> |
output()
The max pooled output tensor.
|
equals, hashCode, toStringpublic static <T extends Number,U extends Number> MaxPoolWithArgmax<T,U> create(Scope scope, Operand<T> input, List<Long> ksize, List<Long> strides, Class<U> Targmax, String padding)
scope - current graph scopeinput - 4-D with shape `[batch, height, width, channels]`. Input to pool over.ksize - The size of the window for each dimension of the input tensor.strides - The stride of the sliding window for each dimension of the
input tensor.Targmax - padding - The type of padding algorithm to use.public static <T extends Number> MaxPoolWithArgmax<T,Long> create(Scope scope, Operand<T> input, List<Long> ksize, List<Long> strides, String padding)
scope - current graph scopeinput - 4-D with shape `[batch, height, width, channels]`. Input to pool over.ksize - The size of the window for each dimension of the input tensor.strides - The stride of the sliding window for each dimension of the
input tensor.padding - The type of padding algorithm to use.Copyright © 2015–2019. All rights reserved.