model.modules.sum_pool.SumPool2d#
- class SumPool2d(kernel_size: int, stride: int = 1, padding: int = 0)[source]#
Bases:
ModuleApplies a 2D average pooling over an input signal composed of several input planes
Summarizes the values of the cells of a kernel. To do this, it calls
torch.nn.functional.avg_pool2d()and multiplies the result by the kernel area.- Parameters:
Methods
Define the computation performed at every call.
Attributes
training- forward(X: Tensor) Tensor[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.