Skip to content
Merged
Changes from 9 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
56 changes: 1 addition & 55 deletions python/paddle/nn/functional/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import numpy as np

from paddle import _C_ops, _legacy_C_ops, in_dynamic_mode
from paddle import _C_ops, in_dynamic_mode
from paddle.base.framework import (
Variable,
in_dygraph_mode,
Expand Down Expand Up @@ -830,24 +830,6 @@ def max_unpool1d(
x, indices, kernel_size, stride, padding, output_size, data_format
)
return squeeze(output, [2])
elif in_dynamic_mode():
output = _legacy_C_ops.unpool(
x,
indices,
'unpooling_type',
'max',
'ksize',
kernel_size,
'strides',
stride,
'paddings',
padding,
"output_size",
output_size,
"data_format",
data_format,
)
return squeeze(output, [2])

op_type = "unpool"
helper = LayerHelper(op_type, **locals())
Expand Down Expand Up @@ -980,24 +962,6 @@ def max_unpool2d(
x, indices, kernel_size, stride, padding, output_size, data_format
)
return output
elif in_dynamic_mode():
output = _legacy_C_ops.unpool(
x,
indices,
'unpooling_type',
'max',
'ksize',
kernel_size,
'strides',
stride,
'paddings',
padding,
"output_size",
output_size,
"data_format",
data_format,
)
return output

op_type = "unpool"
helper = LayerHelper(op_type, **locals())
Expand Down Expand Up @@ -1127,24 +1091,6 @@ def max_unpool3d(
x, indices, kernel_size, stride, padding, output_size, data_format
)
return output
elif in_dynamic_mode():
output = _legacy_C_ops.unpool3d(
x,
indices,
'unpooling_type',
'max',
'ksize',
kernel_size,
'strides',
stride,
'paddings',
padding,
"output_size",
output_size,
"data_format",
data_format,
)
return output

op_type = "unpool3d"
helper = LayerHelper(op_type, **locals())
Expand Down