A tensor containing a batch of input feature maps.
An array of pool dims.
An operation representing a max pool computation.
import dopt.core : evaluate; auto features = float32([1, 1, 4, 4], [ 1.0f, 2.0f, 4.0f, 3.0f, 5.0f, 3.0f, 2.0f, 2.0f, 0.1f, -4.0f, 3.0f, 2.0f, 0.0f, 0.0f, 2.0f, 2.0f ]); auto result = features.maxpool([2,2]); auto pooledFeatures = result.evaluate().get!float; assert(pooledFeatures == [ 5.0f, 4.0f, 0.1f, 3.0f ]);
Creates a max pool operation that performs the computation required to implement a max pooling layer.