Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions DeepFried2/layers/SpatialMaxPooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def symb_forward(self, symb_input):

# downsample height and width first
# other dimensions contribute to batch_size
op = Pool(self.window_size[1:], self.ignore_border, st=self.stride[1:], padding=self.padding[1:])
op = Pool(self.window_size[1:], self.ignore_border, stride=self.stride[1:], pad=self.padding[1:])
output = op(input_4d)

outshape = df.T.join(0, symb_input.shape[:-2], output.shape[-2:])
Expand All @@ -56,7 +56,7 @@ def symb_forward(self, symb_input):

# downsample depth
# other dimensions contribute to batch_size
op = Pool((1,self.window_size[0]), self.ignore_border, st=(1,self.stride[0]), padding=(0, self.padding[0]))
op = Pool((1,self.window_size[0]), self.ignore_border, stride=(1,self.stride[0]), pad=(0, self.padding[0]))
outdepth = op(input_4D_depth)

outshape = df.T.join(0, input_depth.shape[:-2], outdepth.shape[-2:])
Expand All @@ -66,8 +66,8 @@ def symb_forward(self, symb_input):
else:
return pool_2d(
symb_input,
ds=self.window_size,
ws=self.window_size,
ignore_border=self.ignore_border,
st=self.stride,
padding=self.padding
stride=self.stride,
pad=self.padding
)