()
| 134 | |
| 135 | |
| 136 | def test_norm(): |
| 137 | x = Tensor(np.arange(1, 7, dtype=np.int32).reshape(2, 3)) |
| 138 | y = F.norm(x, axis=-1) |
| 139 | np.testing.assert_equal( |
| 140 | y.numpy().round(decimals=3), np.array([3.742, 8.775]).astype(np.float32) |
| 141 | ) |
| 142 | |
| 143 | |
| 144 | def test_sqrt(): |