Skip to content

Commit

Permalink
fix reference variable modification in monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
atenagm1375 committed Mar 29, 2021
1 parent 47b9376 commit 5bf5b25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cnsproject/network/monitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ def record(self) -> None:
"""
for var in self.state_variables:
data = getattr(self.obj, var)
data.unsqueeze_(0)
data = getattr(self.obj, var).unsqueeze(0)
self.recording[var].append(
torch.empty_like(data, device=self.device).copy_(
data, non_blocking=True
Expand Down

0 comments on commit 5bf5b25

Please sign in to comment.