#3886·CNTK

MAX_POOLING crash, when pooling_window_shape contains 0

Author: cheyenneeCreated Dec 9, 2023Updated Dec 9, 2023

In following code, pooling_window_shape is a tuple with 0, C.pooling crash.

repo code:

img = np.reshape(np.arange(16, dtype=np.float32), [1, 4, 4])
x = C.input_variable(img.shape)
layer = C.pooling(operand=x, pooling_type=C.MAX_POOLING, pooling_window_shape=(2,0), strides=(1), ceil_out_dim=True, include_pad=True,
                  auto_padding=[True]).eval({x : [img]})
print(layer)