title: cross entropy is nan
body: <p>I am deploying my conv-deconv net. My question is the cross entropy was always nan while training so the solver didn't update the weights. I checked my code all day but I didn't know where did I go wrong. The following is my architecture:
  <a href="https://i.stack.imgur.com/0Ed6K.png" rel="nofollow"><img src="https://i.stack.imgur.com/0Ed6K.png" alt="enter image description here"></a>
  here is my cross entropy function</p>
  
  <pre><code>ys_reshape = tf.reshape(ys,[-1,1])
  prediction = tf.reshape(relu4,[-1,1])
  cross_entropy = tf.reduce_mean(-(ys_reshape*tf.log(prediction)))
  train_step = tf.train.AdamOptimizer(0.01).minimize(cross_entropy)
  </code></pre>
  
  <p>where the dimension of ys is [1,500,500,1], ys_reshape is [250000,1], relu4 is [1,500,500,1] and prediction is [250000,1]. The value of label matrix, ys are {0,1}, which is a two categories dense prediction. </p>
  
  <p>If I print train_step out it would display None. Can anyone help me?</p>