更新 hack_tensor.md
This commit is contained in:
parent
36a5d796b6
commit
4579e1351c
|
@ -4,7 +4,7 @@ python3.10/site-packages/torch/_tensor.py
|
||||||
|
|
||||||
```
|
```
|
||||||
def __repr__(self, *, tensor_contents=None):
|
def __repr__(self, *, tensor_contents=None):
|
||||||
return "Tensor %s" % (str(self.size()))
|
return "Tensor " + str(self.size()) + " " + self.device.type + " " + str(self.dtype)
|
||||||
if has_torch_function_unary(self):
|
if has_torch_function_unary(self):
|
||||||
return handle_torch_function(
|
return handle_torch_function(
|
||||||
Tensor.__repr__, (self,), self, tensor_contents=tensor_contents
|
Tensor.__repr__, (self,), self, tensor_contents=tensor_contents
|
||||||
|
|
Loading…
Reference in New Issue