Skip to content

Commit

Permalink
fix decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
kzkadc committed Apr 8, 2024
1 parent b1cc792 commit a23b435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ignite/metrics/mutual_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _update(self, prob: torch.Tensor, log_prob: torch.Tensor) -> None:
# We can't use += below as _sum_of_probabilities can be a scalar and prob.sum(dim=0) is a vector
self._sum_of_probabilities = self._sum_of_probabilities + prob.sum(dim=0).to(self._device)

@sync_all_reduce("_sum_of_probabilities")
@sync_all_reduce("_sum_of_probabilities", "_sum_of_entropies", "_num_examples")
def compute(self) -> float:
n = self._num_examples
if n == 0:
Expand Down

0 comments on commit a23b435

Please sign in to comment.