Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/singa
/ zeros_like
Function
zeros_like
python/singa/tensor.py:802–805 ·
view source on GitHub ↗
(t)
Source
from the content-addressed store, hash-verified
800
801
802
def
zeros_like(t):
803
ret = Tensor(t.shape, t.device, t.dtype)
804
ret.set_value(float(0))
805
return
ret
806
807
808
def
ones_like(t):
Callers
nothing calls this directly
Calls
2
set_value
Method · 0.95
Tensor
Class · 0.70
Tested by
no test coverage detected