Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bug in TensorFlow reduce_max for negative infinity?

Using tf.maximum with negative inf inputs as follows:

tf.maximum(-math.inf, -math.inf).eval()

gives the expected result -inf

However, tf.reduce_max, on the same inputs:

tf.reduce_max([-math.inf, -math.inf]).eval()

gives: -3.40282e+38 which is the min float32.

For positive infinity inputs, both functions result in inf. Is this a bug?

like image 750
Andrzej Pronobis Avatar asked Aug 29 '16 17:08

Andrzej Pronobis


1 Answers

This turned out to be a bug in Eigen which has already been fixed and pushed out to TensorFlow.

The issue can be tracked here: https://github.com/tensorflow/tensorflow/issues/4131

like image 125
Andrzej Pronobis Avatar answered Nov 14 '22 04:11

Andrzej Pronobis