Skip to content

Commit

Permalink
update (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s authored Apr 14, 2023
1 parent c38e20a commit a2a85fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch_scatter/composite/logsumexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ def scatter_logsumexp(src: torch.Tensor, index: torch.Tensor, dim: int = -1,
sum_per_index = scatter_sum(recentered_score.exp_(), index, dim, out,
dim_size)

return sum_per_index.add_(eps).log_().add_(max_value_per_index)
out = sum_per_index.add_(eps).log_().add_(max_value_per_index)
return out.nan_to_num_(neginf=0.0)

0 comments on commit a2a85fe

Please sign in to comment.