Skip to content

Commit

Permalink
Ensure axes passed to reduce_max or unique in logeinsum_exp.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 319296408
  • Loading branch information
srvasude authored and tensorflower-gardener committed Jul 1, 2020
1 parent 02b86d2 commit 14dd186
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _binary_einslogsumexp(formula, a, b):
# That method can result in -inf entries even though all of the
# numbers are well within a domain in which `logeinsumexp` shouldn't
# underflow.
almost = tf.reduce_logsumexp(a + b,
axis=tuple(map(intermediates.index, reductions)))
almost = tf.reduce_logsumexp(
a + b, axis=tuple(set(map(intermediates.index, reductions))))

return rearrange(reduced, rhs, almost)

0 comments on commit 14dd186

Please sign in to comment.