1 /** 2 Contains an implementation of max pooling. 3 Authors: Henry Gouk 4 */ 5 module dopt.nnet.layers.maxpool; 6 7 import dopt.core; 8 import dopt.nnet; 9 import dopt.nnet.layers.util; 10 import dopt.online; 11 12 /// 13 Layer maxPool(Layer input, size_t[] dims) 14 { 15 import dopt.core.ops.nnet : maxpool; 16 17 return new Layer( 18 [input], 19 input.output.maxpool(dims), 20 input.trainOutput.maxpool(dims), 21 null 22 ); 23 }