From: @liu_xiao_93 Reviewed-by: @liangchenghui,@wuxuejian Signed-off-by: @liangchenghuitags/v1.2.0-rc1
| @@ -338,7 +338,8 @@ class MSSSIM(Cell): | |||||
| def construct(self, img1, img2): | def construct(self, img1, img2): | ||||
| _check_input_4d(F.shape(img1), "img1", self.cls_name) | _check_input_4d(F.shape(img1), "img1", self.cls_name) | ||||
| _check_input_4d(F.shape(img2), "img2", 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) | P.SameTypeShape()(img1, img2) | ||||
| dtype_max_val = _get_dtype_max(F.dtype(img1)) | dtype_max_val = _get_dtype_max(F.dtype(img1)) | ||||
| max_val = F.scalar_cast(self.max_val, F.dtype(img1)) | max_val = F.scalar_cast(self.max_val, F.dtype(img1)) | ||||
| @@ -6435,7 +6435,7 @@ class DynamicRNN(PrimitiveWithInfer): | |||||
| Has the same type with input `b`. | Has the same type with input `b`. | ||||
| Supported Platforms: | Supported Platforms: | ||||
| ``Ascend`` | |||||
| ``Ascend`` | |||||
| Examples: | Examples: | ||||
| >>> x = Tensor(np.random.rand(2, 16, 64).astype(np.float16)) | >>> 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`. | - If `bias_input` is `None` and `bias_hidden` is not `None, `bias_type` is the date type of `bias_hidden`. | ||||
| Supported Platforms: | Supported Platforms: | ||||
| ``Ascend`` | |||||
| ``Ascend`` | |||||
| Examples: | Examples: | ||||
| >>> x = Tensor(np.random.rand(2, 8, 64).astype(np.float16)) | >>> x = Tensor(np.random.rand(2, 8, 64).astype(np.float16)) | ||||