Error with tf.nn.sparse_softmax_cross_entropy_with_logits
I don't understand how having a shape [50,1] is not the same as being 1D.

While you can reshape a [50, 1] 2D matrix into a [50] 1D matrix just with a simple squeeze, Tensorflow will never do that automatically. 
The only heuristic the tf.nn.sparse_softmax_cross_entropy_with_logits uses to check if the input shape is correct is to check the number of dimensions it has. If it's not 1D, it fails without trying other heuristics like checking if the input could be squeezed. This is a security feature.
I am using tf.nn.sparse_softmax_cross_entropy_with_logits and when I pass through the labels and logits I get the following error

tensorflow.python.framework.errors_impl.InvalidArgumentError: labels
  must be 1-D, but got shape [50,1]

I don't understnad how having a shape [50,1] is not the same as being 1D