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

Method _subscription_helper

test/python/test_tensor.py:372–377  ·  view source on GitHub ↗
(self, dev)

Source from the content-addressed store, hash-verified

370 self._concatenate_helper(gpu_dev)
371
372 def _subscription_helper(self, dev):
373 np1 = np.random.random((5, 5, 5, 5)).astype(np.float32)
374 sg_tensor = tensor.Tensor(device=dev, data=np1)
375 sg_tensor_ret = sg_tensor[1:3, :, 1:, :-1]
376 np.testing.assert_array_almost_equal((tensor.to_numpy(sg_tensor_ret)),
377 np1[1:3, :, 1:, :-1])
378
379 def test_subscription_cpu(self):
380 self._subscription_helper(cpu_dev)

Callers 2

test_subscription_cpuMethod · 0.95
test_subscription_gpuMethod · 0.95

Calls 1

TensorMethod · 0.80

Tested by

no test coverage detected