title: TensorFlow error: logits and labels must be same size
body: <p>I've been trying to learn TensorFlow by implementing ApproximatelyAlexNet based on various examples on the internet. Basically extending the AlexNet example <a href="https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/3%20-%20Neural%20Networks/alexnet.py" rel="noreferrer">here</a> to take 224x224 RGB images (rather than 28x28 grayscale images), and adding a couple more layers, changing kernel sizes, strides, etc, per other AlexNet implementations I've found online.</p>
  
  <p>Have worked through a number of mismatched shape type errors, but this one has me stumped:</p>
  
  <pre><code>tensorflow.python.framework.errors.InvalidArgumentError: logits and labels must be same size: logits_size=dim { size: 49 } dim { size: 10 } labels_size=dim { size: 1 } dim { size: 10 }
       [[Node: SoftmaxCrossEntropyWithLogits = SoftmaxCrossEntropyWithLogits[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"](Softmax, _recv_Placeholder_1_0/_13)]]
       [[Node: gradients/Mean_grad/range_1/_17 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_457_gradients/Mean_grad/range_1", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
  </code></pre>
  
  <p>The 49 dimension is particularly puzzling. For debugging, my batch size is currently 1, if I increase it to 2 then the 49 becomes 98.</p>
  
  <p>If I log the shape of the x and y that I pass to </p>
  
  <pre><code>sess.run(optimizer, feed_dict={x: batchImages, y: batchLabels, keepProb: P_DROPOUT})
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>x shape: (1, 150528)
  y shape: (1, 10)
  </code></pre>
  
  <p>Which is as expected: 150528 = 224 * 224 RGB pixels, and a one-hot vector representing my labels.</p>
  
  <p>Would appreciate any help in figuring this out!</p>
  
  <p><strong>Update:</strong> code exhibiting the fault here:</p>
  
  <p><a href="https://gist.github.com/j4m3z0r/e70096d0f7bd4bd24c42" rel="noreferrer">https://gist.github.com/j4m3z0r/e70096d0f7bd4bd24c42</a></p>