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

Function zeros

python/singa/tensor.py:1832–1835  ·  view source on GitHub ↗
(shape, device=get_default_device())

Source from the content-addressed store, hash-verified

1830
1831
1832def zeros(shape, device=get_default_device()):
1833 ret = Tensor(shape, device=device)
1834 ret.set_value(0.0)
1835 return ret
1836
1837
1838def 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