Skip to content

Commit

Permalink
add type to jacobians_per_rank to prevent type missmatch in cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
arnauq committed Jul 24, 2023
1 parent 7e5cf63 commit 44fc911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blackbirds/infer/vi.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def loss_aux(params):
if torch.isnan(loss_i) or torch.isnan(jacobian).any():
continue
loss += loss_i
jacobians_per_rank.append(torch.tensor(jacobian.cpu().numpy()))
jacobians_per_rank.append(torch.tensor(jacobian.cpu().numpy(), dtype=torch.float))
indices_per_rank.append(i)
# gather the jacobians and parameters from all ranks
if mpi_size > 1:
Expand Down

0 comments on commit 44fc911

Please sign in to comment.