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

Function to_host

python/singa/tensor.py:910–921  ·  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

908
909
910def to_host(t):
911 '''Copy the data to a host tensor.
912
913 Args:
914 t (Tensor): a Tensor
915
916 Returns:
917 new Tensor at host
918 '''
919 ret = t.clone()
920 ret.to_host()
921 return ret
922
923
924def to_numpy(t):

Callers 1

to_numpyFunction · 0.70

Calls 2

cloneMethod · 0.45
to_hostMethod · 0.45

Tested by

no test coverage detected