Moves the tensor to the given device in place.
(self, device:str|tuple[str, ...]|None)
| 373 | return ret.is_param_(self.is_param) |
| 374 | |
| 375 | def to_(self, device:str|tuple[str, ...]|None) -> Tensor: |
| 376 | """ |
| 377 | Moves the tensor to the given device in place. |
| 378 | """ |
| 379 | real = self.to(device) |
| 380 | if self.grad is not None and real.grad is not None: self.grad.replace(real.grad) |
| 381 | return self.replace(real) |
| 382 | |
| 383 | def shard(self, devices:tuple[str, ...], axis:int|None=None) -> Tensor: |
| 384 | """ |