Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/singa
/ __rsub__
Method
__rsub__
examples/model_selection/Trails/singa_pkg_code/tensor.py:719–724 ·
view source on GitHub ↗
(self, lhs)
Source
from the content-addressed store, hash-verified
717
return
one
718
719
def
__rsub__(self, lhs):
720
lhs = float(lhs)
721
one = Tensor(self.shape, self.device, self.dtype)
722
one.set_value(lhs)
723
one -= self
724
return
one
725
726
def
__rmul__(self, lhs):
727
lhs = float(lhs)
Callers
nothing calls this directly
Calls
2
set_value
Method · 0.95
Tensor
Class · 0.70
Tested by
no test coverage detected