(self, *args, **kwargs)
| 30 | raise RuntimeError("Cannot set the device explicitly. Please use module.to(new_device).") |
| 31 | |
| 32 | def to(self, *args, **kwargs) -> Module: |
| 33 | out = torch._C._nn._parse_to(*args, **kwargs) |
| 34 | self.__update_properties(device=out[0], dtype=out[1]) |
| 35 | return super().to(*args, **kwargs) |
| 36 | |
| 37 | def cuda(self, device: Optional[int] = None) -> Module: |
| 38 | self.__update_properties(device=torch.device("cuda", index=device)) |
no test coverage detected