Browse Source

!10608 Fix msssim supported data type and "Supported Platforms" of api.

From: @liu_xiao_93
Reviewed-by: @liangchenghui,@wuxuejian
Signed-off-by: @liangchenghui
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
24e8e98ccc
2 changed files with 4 additions and 3 deletions
  1. +2
    -1
      mindspore/nn/layer/image.py
  2. +2
    -2
      mindspore/ops/operations/nn_ops.py

+ 2
- 1
mindspore/nn/layer/image.py View File

@@ -338,7 +338,8 @@ class MSSSIM(Cell):
def construct(self, img1, img2):
_check_input_4d(F.shape(img1), "img1", self.cls_name)
_check_input_4d(F.shape(img2), "img2", self.cls_name)
_check_input_dtype(F.dtype(img1), 'img1', mstype.number_type, self.cls_name)
valid_type = [mstype.float64, mstype.float32, mstype.float16, mstype.uint8]
_check_input_dtype(F.dtype(img1), 'img1', valid_type, self.cls_name)
P.SameTypeShape()(img1, img2)
dtype_max_val = _get_dtype_max(F.dtype(img1))
max_val = F.scalar_cast(self.max_val, F.dtype(img1))


+ 2
- 2
mindspore/ops/operations/nn_ops.py View File

@@ -6435,7 +6435,7 @@ class DynamicRNN(PrimitiveWithInfer):
Has the same type with input `b`.

Supported Platforms:
``Ascend``
``Ascend``

Examples:
>>> x = Tensor(np.random.rand(2, 16, 64).astype(np.float16))
@@ -6570,7 +6570,7 @@ class DynamicGRUV2(PrimitiveWithInfer):
- If `bias_input` is `None` and `bias_hidden` is not `None, `bias_type` is the date type of `bias_hidden`.

Supported Platforms:
``Ascend``
``Ascend``

Examples:
>>> x = Tensor(np.random.rand(2, 8, 64).astype(np.float16))


Loading…
Cancel
Save