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

Function zeros

examples/model_selection/Trails/singa_pkg_code/tensor.py:1795–1798  ·  view source on GitHub ↗
(shape, device=get_default_device())

Source from the content-addressed store, hash-verified

1793
1794
1795def zeros(shape, device=get_default_device()):
1796 ret = Tensor(shape, device=device)
1797 ret.set_value(0.0)
1798 return ret
1799
1800
1801def ones(shape, device=get_default_device()):

Callers

nothing calls this directly

Calls 3

set_valueMethod · 0.95
get_default_deviceFunction · 0.85
TensorClass · 0.70

Tested by

no test coverage detected