MCPcopy Create free account
hub / github.com/apache/singa / _erf

Method _erf

test/python/test_api.py:343–351  ·  view source on GitHub ↗
(self, dev=cpu_dev)

Source from the content-addressed store, hash-verified

341 self._transpose_and_arithmetic_op_broadcast_helper(cpu_dev)
342
343 def _erf(self, dev=cpu_dev):
344 np1 = np.random.random((2, 3)).astype(np.float32)
345
346 x1 = tensor.from_numpy(np1)
347 x1.to_device(dev)
348 y1 = tensor.from_raw_tensor(singa_api.Erf(x1.data))
349
350 # from scipy.special import erf
351 # np.testing.assert_array_almost_equal(erf(np1), tensor.to_numpy(y1))
352
353 def test_erf_cpu(self):
354 self._erf(cpu_dev)

Callers 1

test_erf_cpuMethod · 0.95

Calls 1

to_deviceMethod · 0.45

Tested by

no test coverage detected