Differences with torch.isclose
torch.isclose
torch.isclose(input, other, rtol=1e-05, atol=1e-08, equal_nan=False) -> Tensor
For more information, see torch.isclose。
mindspore.ops.isclose
mindspore.ops.isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False) -> Tensor
For more information, see mindspore.ops.isclose。
Differences
API function of MindSpore is consistent with that of PyTorch, with differences in the supported data types for parameters.
PyTorch: The dtype of parameter input
and other
can be bool
, int
or float
.
MindSpore: The dtype of parameter x1
and x2
can be int32
, float32
or float16
.
Categories |
Subcategories |
PyTorch |
MindSpore |
Difference |
---|---|---|---|---|
Parameters |
Parameter 1 |
input |
x1 |
Different parameter names. The parameter |
Parameter 2 |
other |
x2 |
Different parameter names. The parameter |
|
Parameter 3 |
rtol |
rtol |
- |
|
Parameter 4 |
atol |
atol |
- |
|
Parameter 5 |
equal_nan |
equal_nan |
- |