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

Function ones

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

Source from the content-addressed store, hash-verified

1799
1800
1801def ones(shape, device=get_default_device()):
1802 ret = Tensor(shape, device=device)
1803 ret.set_value(1.0)
1804 return ret

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