jeudi 24 août 2017

Check if NaN in Tensorflow

I would like to check a tensorflow variable and set it to zero if it is NaN.

How can I do this? The following trick seems not to work:

if tf.is_nan(v) is True:
    v = 0.0

Aucun commentaire:

Enregistrer un commentaire