I have a multilayer perceptron with a sigmoid loss (tf.nn.sigmoid_cross_entropy_with_logits) and an Adam optimizer (tf.train.AdamOptimizer). My input data has several features and some nan feature-values. When I replace the nan values with 0, I get a result, however, when I do not replace the nan values, I get loss=nan.
What is the best way to handle nan values in TensorFlow, and how can I use my input data with nan values without replacing them with 0?