Skip to content

Commit

Permalink
fix entropy term in distributions.py (wrong isinstance check) (#3120)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjankowiak committed Jul 28, 2022
1 parent cdea256 commit 0e0b1ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyro/distributions/torch_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def score_parts(self, value):
log_prob = log_prob.expand(shape)
if isinstance(score_function, torch.Tensor):
score_function = score_function.expand(shape)
if isinstance(score_function, torch.Tensor):
if isinstance(entropy_term, torch.Tensor):
entropy_term = entropy_term.expand(shape)
return ScoreParts(log_prob, score_function, entropy_term)

Expand Down

0 comments on commit 0e0b1ed

Please sign in to comment.