diff --git a/python/paddle/nn/layer/pooling.py b/python/paddle/nn/layer/pooling.py index 68808c6354afbdd6fad44a0f1cc273679c783afd..c664c6e318c46f8ddaed4370992eb1a49a531119 100755 --- a/python/paddle/nn/layer/pooling.py +++ b/python/paddle/nn/layer/pooling.py @@ -1257,9 +1257,8 @@ class MaxUnPool2D(Layer): import paddle import paddle.nn.functional as F - import numpy as np - data = paddle.rand(shape=[1,1,7,7]) + data = paddle.rand(shape=[1,1,6,6]) pool_out, indices = F.max_pool2d(data, kernel_size=2, stride=2, padding=0, return_mask=True) # pool_out shape: [1, 1, 3, 3], indices shape: [1, 1, 3, 3] Unpool2D = paddle.nn.MaxUnPool2D(kernel_size=2, padding=0)