MCPcopy Index your code
hub / github.com/microsoft/TRELLIS / __rsub__

Method __rsub__

trellis/modules/sparse/basic.py:329–330  ·  view source on GitHub ↗
(self, other: Union[torch.Tensor, 'SparseTensor', float])

Source from the content-addressed store, hash-verified

327 return self.__elemwise__(other, torch.sub)
328
329 def __rsub__(self, other: Union[torch.Tensor, 'SparseTensor', float]) -> 'SparseTensor':
330 return self.__elemwise__(other, lambda x, y: torch.sub(y, x))
331
332 def __mul__(self, other: Union[torch.Tensor, 'SparseTensor', float]) -> 'SparseTensor':
333 return self.__elemwise__(other, torch.mul)

Callers

nothing calls this directly

Calls 1

__elemwise__Method · 0.95

Tested by

no test coverage detected