Skip to content

Commit

Permalink
fixed bug in copying to a new device in torch repr of mlnetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
anty-filidor committed Jul 5, 2024
1 parent 4ca0048 commit 128d426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network_diffusion/mln/mlnetwork_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ def device(self) -> str:
@device.setter
def device(self, new_device: str) -> None:
"""Copy tensor-members of the object into a `new_device`."""
self.adjacency_tensor.to(new_device)
self.nodes_mask.to(new_device)
self.adjacency_tensor = self.adjacency_tensor.to(new_device)
self.nodes_mask = self.nodes_mask.to(new_device)

@classmethod
def from_mln(
Expand Down

0 comments on commit 128d426

Please sign in to comment.