private SpatialGatingUnit — parametric type
SpatialGatingUnit(norm, proj)
Creates a spatial gating unit as described in the gMLP paper. (reference)
Arguments
norm: the normalisation layer to useproj: the projection layer to use
SpatialGatingUnit(planes::Integer, npatches::Integer; norm_layer = LayerNorm)
Creates a spatial gating unit as described in the gMLP paper. (reference)
Arguments
planes: the number of planes in the blocknpatches: the number of patches of the inputnorm_layer: the normalisation layer to use