MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / _reset

Method _reset

imperative/python/megengine/tensor.py:161–164  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

159 return super().detach()
160
161 def _reset(self, other):
162 if not isinstance(other, _Tensor):
163 other = Tensor(other, dtype=self.dtype, device=self.device)
164 super()._reset(other)
165
166 def __repr__(self):
167 piece = "{}(".format(self.__class__.__name__)

Callers 3

set_valueMethod · 0.95
__setstate__Method · 0.95
copyFunction · 0.95

Calls 1

TensorClass · 0.70

Tested by 1

copyFunction · 0.76