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

Function _cTensor_to_pyTensor

test/python/test_api.py:66–72  ·  view source on GitHub ↗
(cTensor)

Source from the content-addressed store, hash-verified

64
65
66def _cTensor_to_pyTensor(cTensor):
67 new_t = tensor.Tensor()
68 new_t.data = cTensor
69 new_t.shape = tuple(new_t.data.shape())
70 new_t.device = new_t.data.device()
71 new_t.dtype = new_t.data.data_type()
72 return new_t
73
74
75def _ctensor_eq_ndarray(t1, np1):

Callers 9

_run_trainingMethod · 0.85
_run_testingMethod · 0.85
test_dnnl_pooling_maxMethod · 0.85
test_dnnl_pooling_avgMethod · 0.85
_concat_helperMethod · 0.85
_ceil_helperMethod · 0.85
_floor_helperMethod · 0.85
_as_type_helperMethod · 0.85

Calls 5

TensorMethod · 0.80
shapeMethod · 0.80
deviceMethod · 0.80
data_typeMethod · 0.80
tupleFunction · 0.50

Tested by

no test coverage detected