Solved by KFrank in post #2 
              
              
                Hi Akib! 

cross_entropy() and binary_cross_entropy_with_logits take 
targets (your y_label) with differing shapes, and, in fact, with 
different numbers of dimensions. 
If input (your y_hat) has shape [nBatch, nClass, height, width], 
cross_entropy_loss() expects a target with shape 
[nBatch, heigh…