(self, dev)
| 1131 | self._Atanh_helper(gpu_dev) |
| 1132 | |
| 1133 | def _Less_helper(self, dev): |
| 1134 | x0 = np.array([-0.9, -0.3, -0.1, 0.1, 0.5, |
| 1135 | 0.9]).reshape(3, 2).astype(np.float32) |
| 1136 | x1 = np.array([0, -0.3, 0, 0.1, 0, 0.9]).reshape(3, |
| 1137 | 2).astype(np.float32) |
| 1138 | y = np.less(x0, x1) |
| 1139 | x0 = tensor.from_numpy(x0) |
| 1140 | x1 = tensor.from_numpy(x1) |
| 1141 | x0.to_device(dev) |
| 1142 | x1.to_device(dev) |
| 1143 | |
| 1144 | result = autograd.less(x0, x1) |
| 1145 | np.testing.assert_array_almost_equal(tensor.to_numpy(result), |
| 1146 | y, |
| 1147 | decimal=5) |
| 1148 | |
| 1149 | def test_Less_cpu(self): |
| 1150 | self._Less_helper(cpu_dev) |
no test coverage detected