Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
808
def
ones_like(t):
809
ret = Tensor(t.shape, t.device, t.dtype)
810
ret.set_value(float(1))
811
return
ret
812
813
814
def
product(shape):
Callers
nothing calls this directly
Calls
2
set_value
Method · 0.95
Tensor
Class · 0.70
Tested by
no test coverage detected