def data_format_error(): data = paddle.randint(shape=[1, 1, 3, 3]) indices = paddle.reshape(paddle.arange(4, 40), shape[1, 1, 3, 4]) MaxPool2D = F.maxunpool2d(data, indices, kernel_size=2, stride=2, data_format="NHWC")
def data_outputsize_error2(): data = paddle.randint(shape=[1, 1, 3, 3]) indices = paddle.reshape(paddle.arange(4, 40), shape[1, 1, 3, 4]) MaxPool2D = F.maxunpool2d(data, indices, kernel_size=2, stride=2, output_size=[100, 100])
def indices_value_error(): data = paddle.randint(shape=[1, 1, 3, 3]) indices = paddle.reshape(paddle.arange(4, 40), shape[1, 1, 3, 4]) MaxPool2D = F.maxunpool2d(data, indices, kernel_size=2, stride=2)