add 'half_pixel' coordinate_transformation_mode support on CPU device when mode is 'bilinear'

This commit is contained in:
fandawei 2022-11-26 17:11:41 +08:00
parent 2923126c8b
commit 753224c377
4 changed files with 0 additions and 10 deletions

View File

@ -7,8 +7,6 @@ mindspore.ops.ResizeBilinearV2
调整过程只改变输入图像最低量维度的数据,分别代表高和宽。
.. warning::
在CPU后端不支持将 `half_pixel_centers` 设为True。
参数:
- **align_corners** (bool可选) - 如果为True则使用比例 :math:`(new\_height - 1) / (height - 1)` 对输入进行缩放此时输入图像和输出图像的四个角严格对齐。如果为False使用比例 :math:`new\_height / height` 输入进行缩放。默认值False。

View File

@ -9,7 +9,6 @@ mindspore.ops.interpolate
- 实验特性,接口可能发生变化。
- `roi` 是保留输入, `crop_and_resize` 坐标变换模式下生效,当前不支持。
- Ascend平台下当前不支持将 `mode` 设置为"linear"。
- CPU平台下`mode` 是"bilinear"时,当前不支持将 `coordinate_transformation_mode` 设置为"half_pixel"。
参数:
- **x** (Tensor) - 输入Tensor。当 `mode` 是"linear"时, `x` 为3维Tensor。当 `mode` 是"bilinear"时, `x` 为4维Tensor。

View File

@ -1959,8 +1959,6 @@ def interpolate(x, roi=None, scales=None, sizes=None, coordinate_transformation_
- The `roi` is reserved interface for 'crop_and_resize' coordinate transformation mode,
which is not support now.
- The Ascend platforms is currently not supported when `mode` is "linear".
- The 'half_pixel' coordinate_transformation_mode is currently not supported on CPU device
when mode is "bilinear".
Args:
x (Tensor): a tensor which to resize. `x` is a 3-D tensor when `mode` is "linear". `x` is a 4-D tensor when

View File

@ -688,8 +688,6 @@ class ResizeBilinearV2(Primitive):
The resizing only affects the lower two dimensions which represent the height and width.
.. warning::
On CPU, setting `half_pixel_centers` to True is currently not supported.
Args:
align_corners (bool, optional): If true, rescale input by :math:`(new\_height - 1) / (height - 1)`,
@ -741,9 +739,6 @@ class ResizeBilinearV2(Primitive):
half_pixel_centers, [bool], self.name)
if half_pixel_centers and align_corners:
raise ValueError(f"If half_pixel_centers is True, align_corners must be False, but got {align_corners}")
target = context.get_context("device_target")
if half_pixel_centers and target == "CPU":
raise ValueError(f"Currently `half_pixel_centers`=True is not supported in CPU device_target")
class ResizeBicubic(Primitive):