Fix RuntimeError while running examples/eager_mode.py (#1647)

pull/1645/head
Shivam Gupta 2022-11-25 21:51:56 +05:30 committed by GitHub
parent 9fb63ce9d9
commit 853fd5c965
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -88,4 +88,4 @@ class EagerModeRefBackend(TorchMLIREagerBackend):
return torch.from_numpy(e).clone()
def transfer_from_torch_to_device(self, tensor: torch.Tensor) -> np.ndarray:
return tensor.numpy()
return tensor.detach().numpy()