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

Function ones_like

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

Source from the content-addressed store, hash-verified

806
807
808def ones_like(t):
809 ret = Tensor(t.shape, t.device, t.dtype)
810 ret.set_value(float(1))
811 return ret
812
813
814def product(shape):

Callers

nothing calls this directly

Calls 2

set_valueMethod · 0.95
TensorClass · 0.70

Tested by

no test coverage detected