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

Function to_host

examples/model_selection/Trails/singa_pkg_code/tensor.py:877–888  ·  view source on GitHub ↗

Copy the data to a host tensor. Args: t (Tensor): a Tensor Returns: new Tensor at host

(t)

Source from the content-addressed store, hash-verified

875
876
877def to_host(t):
878 '''Copy the data to a host tensor.
879
880 Args:
881 t (Tensor): a Tensor
882
883 Returns:
884 new Tensor at host
885 '''
886 ret = t.clone()
887 ret.to_host()
888 return ret
889
890
891def to_numpy(t):

Callers 1

to_numpyFunction · 0.70

Calls 2

cloneMethod · 0.45
to_hostMethod · 0.45

Tested by

no test coverage detected