未验证 提交 890bd626 编写于 作者: X xiaoting 提交者: GitHub

add maxunpool2d in __all__ (#37698)

* add maxunpool2d in __all__

* fix MaxUnPool2D example
上级 ca6ff1f6
...@@ -295,5 +295,6 @@ __all__ = [ #noqa ...@@ -295,5 +295,6 @@ __all__ = [ #noqa
'ELU', 'ELU',
'ReLU6', 'ReLU6',
'LayerDict', 'LayerDict',
'ZeroPad2D' 'ZeroPad2D',
'MaxUnPool2D',
] ]
...@@ -1181,7 +1181,7 @@ class MaxUnPool2D(Layer): ...@@ -1181,7 +1181,7 @@ class MaxUnPool2D(Layer):
pool_out, indices = F.max_pool2d(data, kernel_size=2, stride=2, padding=0, return_mask=True) 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] # pool_out shape: [1, 1, 3, 3], indices shape: [1, 1, 3, 3]
Unpool2D = paddle.nn.MaxUnPool2D(kernel_size=2, padding=0) Unpool2D = paddle.nn.MaxUnPool2D(kernel_size=2, padding=0)
unpool_out = UnPool2D(pool_out, indices) unpool_out = Unpool2D(pool_out, indices)
# unpool_out shape: [1, 1, 6, 6] # unpool_out shape: [1, 1, 6, 6]
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册