peal.architectures.basic_modules.Mean¶
- class peal.architectures.basic_modules.Mean[source]¶
Bases:
ModuleAverage over a set of dimensions (global average pooling by default).
- Parameters:
dims (
listofint, optional) – Dimensions to reduce sequentially. If None, every dimension from 2 upwards is reduced in reverse order, i.e. all spatial axes of an(N, C, ...)tensor.input_shape (
list, optional) – Initial value of theinput_shapeattribute; overwritten on every forward pass with[-1] + list(x.shape[1:])so that inverse (un-pooling) layers can look it up.
Methods
Record
input_shapeand reducexover the configured dims.