Class FractionalAvgPool<T extends TNumber>
java.lang.Object
org.tensorflow.op.RawOp
org.tensorflow.op.nn.FractionalAvgPool<T>
- All Implemented Interfaces:
Op
Performs fractional average pooling on the input.
Fractional average pooling is similar to Fractional max pooling in the pooling
region generation step. The only difference is that after pooling regions are
generated, a mean operation is performed instead of a max operation in each
pooling region.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFractionalAvgPool.Inputs<T extends TNumber>static classOptional attributes forFractionalAvgPool -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of this op, as known by TensorFlow core engine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets colPoolingSequence. column pooling sequence, needed to calculate gradient.static <T extends TNumber>
FractionalAvgPool<T> create(Scope scope, Operand<T> value, List<Float> poolingRatio, FractionalAvgPool.Options... options) Factory method to create a class wrapping a new FractionalAvgPool operation.static FractionalAvgPool.Optionsdeterministic(Boolean deterministic) Sets the deterministic option.output()Gets output. output tensor after fractional avg pooling.static FractionalAvgPool.Optionsoverlapping(Boolean overlapping) Sets the overlapping option.static FractionalAvgPool.OptionspseudoRandom(Boolean pseudoRandom) Sets the pseudoRandom option.Gets rowPoolingSequence. row pooling sequence, needed to calculate gradient.static FractionalAvgPool.OptionsSets the seed option.static FractionalAvgPool.OptionsSets the seed2 option.
-
Field Details
-
OP_NAME
The name of this op, as known by TensorFlow core engine- See Also:
-
-
Constructor Details
-
FractionalAvgPool
-
-
Method Details
-
create
@Endpoint(describeByClass=true) public static <T extends TNumber> FractionalAvgPool<T> create(Scope scope, Operand<T> value, List<Float> poolingRatio, FractionalAvgPool.Options... options) Factory method to create a class wrapping a new FractionalAvgPool operation.- Type Parameters:
T- data type forFractionalAvgPooloutput and operands- Parameters:
scope- current scopevalue- 4-D with shape[batch, height, width, channels].poolingRatio- Pooling ratio for each dimension ofvalue, currently only supports row and col dimension and should be >= 1.0. For example, a valid pooling ratio looks like [1.0, 1.44, 1.73, 1.0]. The first and last elements must be 1.0 because we don't allow pooling on batch and channels dimensions. 1.44 and 1.73 are pooling ratio on height and width dimensions respectively.options- carries optional attribute values- Returns:
- a new instance of FractionalAvgPool
-
pseudoRandom
Sets the pseudoRandom option.- Parameters:
pseudoRandom- When set to True, generates the pooling sequence in a pseudorandom fashion, otherwise, in a random fashion. Check paper Benjamin Graham, Fractional Max-Pooling for difference between pseudorandom and random.- Returns:
- this Options instance.
-
overlapping
Sets the overlapping option.- Parameters:
overlapping- When set to True, it means when pooling, the values at the boundary of adjacent pooling cells are used by both cells. For example:index 0 1 2 3 4value 20 5 16 3 7If the pooling sequence is [0, 2, 4], then 16, at index 2 will be used twice. The result would be [41/3, 26/3] for fractional avg pooling.
- Returns:
- this Options instance.
-
deterministic
Sets the deterministic option.- Parameters:
deterministic- When set to True, a fixed pooling region will be used when iterating over a FractionalAvgPool node in the computation graph. Mainly used in unit test to make FractionalAvgPool deterministic.- Returns:
- this Options instance.
-
seed
Sets the seed option.- Parameters:
seed- If either seed or seed2 are set to be non-zero, the random number generator is seeded by the given seed. Otherwise, it is seeded by a random seed.- Returns:
- this Options instance.
-
seed2
Sets the seed2 option.- Parameters:
seed2- An second seed to avoid seed collision.- Returns:
- this Options instance.
-
output
-
rowPoolingSequence
-
colPoolingSequence
-