Skip to content

Commit f17b05d

Browse files
authored
Merge pull request #14492 from heavengate/resize_nearest_example
Add python example for resize_nearest Api
2 parents 1d3e9bd + bb2b35c commit f17b05d

File tree

1 file changed

+11
-1
lines changed
  • python/paddle/fluid/layers

1 file changed

+11
-1
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5788,7 +5788,7 @@ def image_resize(input,
57885788
Examples:
57895789
.. code-block:: python
57905790
5791-
out = fluid.layers.image_resize(input, out_shape=[12, 12])
5791+
out = fluid.layers.image_resize(input, out_shape=[12, 12], resample="NEAREST")
57925792
"""
57935793
resample_methods = {
57945794
'BILINEAR': 'bilinear',
@@ -5891,6 +5891,11 @@ def resize_bilinear(input,
58915891
58925892
Returns:
58935893
${out_comment}.
5894+
5895+
Examples:
5896+
.. code-block:: python
5897+
5898+
out = fluid.layers.resize_bilinear(input, out_shape=[12, 12])
58945899
"""
58955900

58965901
return image_resize(input, out_shape, scale, name, 'BILINEAR', actual_shape)
@@ -5937,6 +5942,11 @@ def resize_nearest(input,
59375942
59385943
Returns:
59395944
${out_comment}.
5945+
5946+
Examples:
5947+
.. code-block:: python
5948+
5949+
out = fluid.layers.resize_nearest(input, out_shape=[12, 12])
59405950
"""
59415951

59425952
return image_resize(input, out_shape, scale, name, 'NEAREST', actual_shape)

0 commit comments

Comments
 (0)