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

Function zeros_like

python/singa/tensor.py:802–805  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

800
801
802def zeros_like(t):
803 ret = Tensor(t.shape, t.device, t.dtype)
804 ret.set_value(float(0))
805 return ret
806
807
808def ones_like(t):

Callers

nothing calls this directly

Calls 2

set_valueMethod · 0.95
TensorClass · 0.70

Tested by

no test coverage detected