I'm trying out TensorFlow and I'm running into a strange error. I edited the deep MNIST example to use another set of images, and the algorithm converges nicely again, until around iteration 8000 (accuracy 91% at that point) when it crashes with the following error.
tensorflow.python.framework.errors.InvalidArgumentError: ReluGrad input is not finite
At first I thought maybe some coefficients were reaching the limit for a float, but adding l2 regularization on all weights & biases didn't resolve the issue. It's always the first relu application that comes out of the stacktrace:
h_conv1 = tf.nn.relu(conv2d(x_image, W_conv1) + b_conv1)
I'm working on CPU only for now. Any idea what could cause this and how to work around it?
Edit: I traced it down to this problem Tensorflow NaN bug?, the solution there works.