未验证 提交 8b307042 编写于 作者: R ruri 提交者: GitHub

[API2.0]remove image_resize series api in Paddle2.0 (#27886)

* remove image_resize series api in Paddle2.0
上级 c5fcc96d
...@@ -7109,9 +7109,6 @@ def image_resize(input, ...@@ -7109,9 +7109,6 @@ def image_resize(input,
align_mode=1, align_mode=1,
data_format='NCHW'): data_format='NCHW'):
""" """
:alias_main: paddle.nn.functional.image_resize
:alias: paddle.nn.functional.image_resize,paddle.nn.functional.vision.image_resize
:old_api: paddle.fluid.layers.image_resize
This op resizes a batch of images. This op resizes a batch of images.
...@@ -7351,8 +7348,10 @@ def image_resize(input, ...@@ -7351,8 +7348,10 @@ def image_resize(input,
.. code-block:: python .. code-block:: python
#declarative mode #declarative mode
import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np
paddle.enable_static()
input = fluid.data(name="input", shape=[None,3,6,10]) input = fluid.data(name="input", shape=[None,3,6,10])
#1 #1
...@@ -7709,9 +7708,6 @@ def resize_bilinear(input, ...@@ -7709,9 +7708,6 @@ def resize_bilinear(input,
align_mode=1, align_mode=1,
data_format='NCHW'): data_format='NCHW'):
""" """
:alias_main: paddle.nn.functional.resize_bilinear
:alias: paddle.nn.functional.resize_bilinear,paddle.nn.functional.vision.resize_bilinear
:old_api: paddle.fluid.layers.resize_bilinear
This op resizes the input by performing bilinear interpolation based on given This op resizes the input by performing bilinear interpolation based on given
output shape which specified by actual_shape, out_shape and scale output shape which specified by actual_shape, out_shape and scale
...@@ -7804,6 +7800,8 @@ def resize_bilinear(input, ...@@ -7804,6 +7800,8 @@ def resize_bilinear(input,
#declarative mode #declarative mode
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle
paddle.enable_static()
import numpy as np import numpy as np
input = fluid.data(name="input", shape=[None,3,6,10]) input = fluid.data(name="input", shape=[None,3,6,10])
...@@ -7876,9 +7874,6 @@ def resize_trilinear(input, ...@@ -7876,9 +7874,6 @@ def resize_trilinear(input,
align_mode=1, align_mode=1,
data_format='NCDHW'): data_format='NCDHW'):
""" """
:alias_main: paddle.nn.functional.resize_trilinear
:alias: paddle.nn.functional.resize_trilinear,paddle.nn.functional.vision.resize_trilinear
:old_api: paddle.fluid.layers.resize_trilinear
This op resizes the input by performing trilinear interpolation based on given This op resizes the input by performing trilinear interpolation based on given
output shape which specified by actual_shape, out_shape and scale output shape which specified by actual_shape, out_shape and scale
...@@ -7971,7 +7966,9 @@ def resize_trilinear(input, ...@@ -7971,7 +7966,9 @@ def resize_trilinear(input,
#declarative mode #declarative mode
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle
import numpy as np import numpy as np
paddle.enable_static()
input = fluid.data(name="input", shape=[None,3,6,8,10]) input = fluid.data(name="input", shape=[None,3,6,8,10])
#1 #1
...@@ -8044,9 +8041,6 @@ def resize_nearest(input, ...@@ -8044,9 +8041,6 @@ def resize_nearest(input,
align_corners=True, align_corners=True,
data_format='NCHW'): data_format='NCHW'):
""" """
:alias_main: paddle.nn.functional.resize_nearest
:alias: paddle.nn.functional.resize_nearest,paddle.nn.functional.vision.resize_nearest
:old_api: paddle.fluid.layers.resize_nearest
This op resizes the input by performing nearest neighbor interpolation in both the This op resizes the input by performing nearest neighbor interpolation in both the
height direction and the width direction based on given output shape height direction and the width direction based on given output shape
...@@ -8129,6 +8123,9 @@ def resize_nearest(input, ...@@ -8129,6 +8123,9 @@ def resize_nearest(input,
#declarative mode #declarative mode
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np
import paddle
paddle.enable_static()
input = fluid.data(name="input", shape=[None,3,6,10]) input = fluid.data(name="input", shape=[None,3,6,10])
#1 #1
......
...@@ -199,16 +199,12 @@ from .vision import generate_mask_labels #DEFINE_ALIAS ...@@ -199,16 +199,12 @@ from .vision import generate_mask_labels #DEFINE_ALIAS
from .vision import generate_proposal_labels #DEFINE_ALIAS from .vision import generate_proposal_labels #DEFINE_ALIAS
from .vision import generate_proposals #DEFINE_ALIAS from .vision import generate_proposals #DEFINE_ALIAS
from .vision import grid_sample #DEFINE_ALIAS from .vision import grid_sample #DEFINE_ALIAS
from .vision import image_resize #DEFINE_ALIAS
from .vision import image_resize_short #DEFINE_ALIAS from .vision import image_resize_short #DEFINE_ALIAS
# from .vision import multi_box_head #DEFINE_ALIAS # from .vision import multi_box_head #DEFINE_ALIAS
from .vision import pixel_shuffle #DEFINE_ALIAS from .vision import pixel_shuffle #DEFINE_ALIAS
from .vision import prior_box #DEFINE_ALIAS from .vision import prior_box #DEFINE_ALIAS
from .vision import prroi_pool #DEFINE_ALIAS from .vision import prroi_pool #DEFINE_ALIAS
from .vision import psroi_pool #DEFINE_ALIAS from .vision import psroi_pool #DEFINE_ALIAS
from .vision import resize_bilinear #DEFINE_ALIAS
from .vision import resize_nearest #DEFINE_ALIAS
from .vision import resize_trilinear #DEFINE_ALIAS
from .vision import retinanet_detection_output #DEFINE_ALIAS from .vision import retinanet_detection_output #DEFINE_ALIAS
from .vision import retinanet_target_assign #DEFINE_ALIAS from .vision import retinanet_target_assign #DEFINE_ALIAS
from .vision import roi_align #DEFINE_ALIAS from .vision import roi_align #DEFINE_ALIAS
......
...@@ -34,13 +34,9 @@ from ...fluid.layers import distribute_fpn_proposals #DEFINE_ALIAS ...@@ -34,13 +34,9 @@ from ...fluid.layers import distribute_fpn_proposals #DEFINE_ALIAS
from ...fluid.layers import generate_mask_labels #DEFINE_ALIAS from ...fluid.layers import generate_mask_labels #DEFINE_ALIAS
from ...fluid.layers import generate_proposal_labels #DEFINE_ALIAS from ...fluid.layers import generate_proposal_labels #DEFINE_ALIAS
from ...fluid.layers import generate_proposals #DEFINE_ALIAS from ...fluid.layers import generate_proposals #DEFINE_ALIAS
from ...fluid.layers import image_resize #DEFINE_ALIAS
from ...fluid.layers import prior_box #DEFINE_ALIAS from ...fluid.layers import prior_box #DEFINE_ALIAS
from ...fluid.layers import prroi_pool #DEFINE_ALIAS from ...fluid.layers import prroi_pool #DEFINE_ALIAS
from ...fluid.layers import psroi_pool #DEFINE_ALIAS from ...fluid.layers import psroi_pool #DEFINE_ALIAS
from ...fluid.layers import resize_bilinear #DEFINE_ALIAS
from ...fluid.layers import resize_nearest #DEFINE_ALIAS
from ...fluid.layers import resize_trilinear #DEFINE_ALIAS
from ...fluid.layers import roi_align #DEFINE_ALIAS from ...fluid.layers import roi_align #DEFINE_ALIAS
from ...fluid.layers import roi_pool #DEFINE_ALIAS from ...fluid.layers import roi_pool #DEFINE_ALIAS
from ...fluid.layers import space_to_depth #DEFINE_ALIAS from ...fluid.layers import space_to_depth #DEFINE_ALIAS
...@@ -74,16 +70,12 @@ __all__ = [ ...@@ -74,16 +70,12 @@ __all__ = [
'generate_proposal_labels', 'generate_proposal_labels',
'generate_proposals', 'generate_proposals',
'grid_sample', 'grid_sample',
'image_resize',
'image_resize_short', 'image_resize_short',
# 'multi_box_head', # 'multi_box_head',
'pixel_shuffle', 'pixel_shuffle',
'prior_box', 'prior_box',
'prroi_pool', 'prroi_pool',
'psroi_pool', 'psroi_pool',
'resize_bilinear',
'resize_nearest',
'resize_trilinear',
'retinanet_detection_output', 'retinanet_detection_output',
'retinanet_target_assign', 'retinanet_target_assign',
'roi_align', 'roi_align',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册