|
|
|
@ -6844,6 +6844,8 @@ def image_resize(input,
|
|
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
|
|
.. code-block:: text
|
|
|
|
|
|
|
|
|
|
For scale:
|
|
|
|
|
|
|
|
|
|
if align_corners = True && out_size > 1 :
|
|
|
|
@ -6863,8 +6865,8 @@ def image_resize(input,
|
|
|
|
|
input : (N,C,H_in,W_in)
|
|
|
|
|
output: (N,C,H_out,W_out) where:
|
|
|
|
|
|
|
|
|
|
H_out = \left \lfloor {H_{in} * scale_{}factor}} \right \rfloor
|
|
|
|
|
W_out = \left \lfloor {W_{in} * scale_{}factor}} \right \rfloor
|
|
|
|
|
H_out = floor (H_{in} * scale_{factor})
|
|
|
|
|
W_out = floor (W_{in} * scale_{factor})
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
align_corners = True
|
|
|
|
@ -7048,12 +7050,10 @@ def resize_bilinear(input,
|
|
|
|
|
Align_corners and align_mode are optinal parameters,the calculation
|
|
|
|
|
method of interpolation can be selected by them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Align_corners and align_mode are optinal parameters,the calculation method
|
|
|
|
|
of interpolation can be selected by them.
|
|
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
|
|
.. code-block:: text
|
|
|
|
|
|
|
|
|
|
For scale:
|
|
|
|
|
|
|
|
|
|
if align_corners = True && out_size > 1 :
|
|
|
|
@ -7134,12 +7134,14 @@ def resize_nearest(input,
|
|
|
|
|
align_corners=True):
|
|
|
|
|
"""
|
|
|
|
|
Resize input by performing nearest neighbor interpolation in both the
|
|
|
|
|
3rd dimention(in height direction) and the 4th dimention(in width
|
|
|
|
|
direction) based on given output shape which specified by actual_shape,
|
|
|
|
|
3rd dimension(in height direction) and the 4th dimension(in width
|
|
|
|
|
direction) based on given output shape which is specified by actual_shape,
|
|
|
|
|
out_shape and scale in priority order.
|
|
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
|
|
.. code-block:: text
|
|
|
|
|
|
|
|
|
|
For scale:
|
|
|
|
|
|
|
|
|
|
if align_corners = True && out_size > 1 :
|
|
|
|
@ -7159,8 +7161,8 @@ def resize_nearest(input,
|
|
|
|
|
input : (N,C,H_in,W_in)
|
|
|
|
|
output: (N,C,H_out,W_out) where:
|
|
|
|
|
|
|
|
|
|
H_out = \left \lfloor {H_{in} * scale_{}factor}} \right \rfloor
|
|
|
|
|
W_out = \left \lfloor {W_{in} * scale_{}factor}} \right \rfloor
|
|
|
|
|
H_out = floor(H_{in} * scale_{factor})
|
|
|
|
|
W_out = floor(W_{in} * scale_{factor})
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
align_corners = True
|
|
|
|
|