All Implemented Interfaces:
Function <Tensor ,Tensor >
, Layer
public class AdaptiveAvgPool2dLayer
extends Object
implements Layer
An adaptive average pooling that reduces a tensor by combining cells.
The output size should be specified and the stride and kernel-size are
automatically selected to adapt to the needs.
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods
org.bytedeco.pytorch.Module
Returns the PyTorch Module object.
Forward propagation (or forward pass) through the layer.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Constructor Details
AdaptiveAvgPool2dLayer
public AdaptiveAvgPool2dLayer (int size)
Constructor.
Parameters:
size
- the output size.
AdaptiveAvgPool2dLayer
public AdaptiveAvgPool2dLayer (int height,
int width)
Constructor.
Parameters:
height
- the output height.
width
- the output width.
Method Details
asTorch
public org.bytedeco.pytorch.Module asTorch ()
Description copied from interface: Layer
Returns the PyTorch Module object.
Specified by:
asTorch
in interface Layer
Returns:
the PyTorch Module object.
forward
Description copied from interface: Layer
Forward propagation (or forward pass) through the layer.
Specified by:
forward
in interface Layer
Parameters:
input
- the input tensor.
Returns:
the output tensor.