!39860 [MS][DOCS]remove ResizeLinear1D

Merge pull request !39860 from mengyuanli/code_docs_bug_fix
This commit is contained in:
i-robot 2022-08-05 10:03:04 +00:00 committed by Gitee
commit d22506174a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,6 @@ MindSpore中 `mindspore.ops` 接口与上一版本相比,新增、删除和支
mindspore.ops.Padding
mindspore.ops.ResizeNearestNeighbor
mindspore.ops.ResizeBilinear
mindspore.ops.ResizeLinear1D
损失函数
^^^^^^^^^^

View File

@ -790,12 +790,13 @@ def interpolate(x, roi=None, scales=None, sizes=None, coordinate_transformation_
ValueError: If `mode` is not in the support list.
Examples:
>>> # case 1: linear mode
>>> x = Tensor([[[1, 2, 3], [4, 5, 6]]], mindspore.float32)
>>> output = ops.interpolate(x, None, None, (6,), "align_corners")
>>> print(output)
[[[1. 1.4 1.8 2.2 2.6 3.]
[4. 4.4 4.8 5.2 5.6 6.]]]
>>>
>>> # case 2: bilinear mode
>>> x = Tensor([[[[1, 2, 3, 4, 5], [1, 2, 3, 4, 5]]]], mindspore.float32)
>>> output = ops.interpolate(x, None, None, (5, 5), "asymmetric", "bilinear")
>>> print(output)