MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / __init__

Method __init__

mla/neuralnet/layers/convnet.py:79–91  ·  view source on GitHub ↗

Max pooling layer. Input shape: (n_images, n_channels, height, width) Parameters ---------- pool_shape : tuple(int, int), default (2, 2) stride : tuple(int, int), default (1,1) padding : tuple(int, int), default (0,0)

(self, pool_shape=(2, 2), stride=(1, 1), padding=(0, 0))

Source from the content-addressed store, hash-verified

77
78class MaxPooling(Layer):
79 def __init__(self, pool_shape=(2, 2), stride=(1, 1), padding=(0, 0)):
80 """Max pooling layer.
81 Input shape: (n_images, n_channels, height, width)
82
83 Parameters
84 ----------
85 pool_shape : tuple(int, int), default (2, 2)
86 stride : tuple(int, int), default (1,1)
87 padding : tuple(int, int), default (0,0)
88 """
89 self.pool_shape = pool_shape
90 self.stride = stride
91 self.padding = padding
92
93 def forward_pass(self, X):
94 self.last_input = X

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected