add raises description for Cast, Diag, Eye, Fill etc. operators.

pull/12535/head
wangshuide2020 4 years ago
parent b4a3f3c1ba
commit 8a7fa2e651

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
# Copyright 2020 Huawei Technologies Co., Ltd
# Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -53,6 +53,11 @@ class CropAndResize(PrimitiveWithInfer):
Outputs:
A 4-D tensor of shape [num_boxes, crop_height, crop_width, depth] with type: float32.
Raises:
TypeError: If `method` is not a str.
TypeError: If `extrapolation_value` is not a float.
ValueError: If `method` is not one of 'bilinear', 'nearest', 'bilinear_v2'.
Supported Platforms:
``Ascend``

File diff suppressed because it is too large Load Diff

@ -111,10 +111,10 @@ def test_pow():
def test_exp():
""" test_exp """
input_tensor = Tensor(np.array([[2, 2], [3, 3]]))
input_tensor = Tensor(np.array([[2, 2], [3, 3]], np.float32))
testexp = P.Exp()
result = testexp(input_tensor)
expect = np.exp(np.array([[2, 2], [3, 3]]))
expect = np.exp(np.array([[2, 2], [3, 3]], np.float32))
assert np.all(result.asnumpy() == expect)

Loading…
Cancel
Save