|
Safemotion Lib
|
Public Member Functions | |
| __init__ (self, norm=3, output_size=1, eps=1e-6) | |
| forward (self, x) | |
| __repr__ (self) | |
Public Attributes | |
| p | |
| output_size | |
| eps | |
Applies a 2D power-average adaptive pooling over an input signal composed of several input planes.
The function computed is: :math:`f(X) = pow(sum(pow(X, p)), 1/p)`
- At p = infinity, one gets Max Pooling
- At p = 1, one gets Average Pooling
The output is of size H x W, for any input size.
The number of output features is equal to the number of input planes.
Args:
output_size: the target output size of the image of the form H x W.
Can be a tuple (H, W) or a single H for a square image H x H
H and W can be either a ``int``, or ``None`` which means the size will
be the same as that of the input.
Definition at line 25 of file pooling.py.
| fastreid.layers.pooling.GeneralizedMeanPooling.__init__ | ( | self, | |
| norm = 3, | |||
| output_size = 1, | |||
| eps = 1e-6 ) |
Reimplemented in fastreid.layers.pooling.GeneralizedMeanPoolingP.
Definition at line 39 of file pooling.py.
| fastreid.layers.pooling.GeneralizedMeanPooling.__repr__ | ( | self | ) |
Definition at line 50 of file pooling.py.
| fastreid.layers.pooling.GeneralizedMeanPooling.forward | ( | self, | |
| x ) |
Definition at line 46 of file pooling.py.
| fastreid.layers.pooling.GeneralizedMeanPooling.eps |
Definition at line 44 of file pooling.py.
| fastreid.layers.pooling.GeneralizedMeanPooling.output_size |
Definition at line 43 of file pooling.py.
| fastreid.layers.pooling.GeneralizedMeanPooling.p |
Definition at line 42 of file pooling.py.