title: Cross Entropy Loss for Semantic Segmentation Keras
body: <p>I'm pretty sure this is a silly question but I can't find it anywhere else so I'm going to ask it here.</p>
  
  <p>I'm doing semantic image segmentation using a cnn (unet) in keras with 7 labels. So my label for each image is (7,n_rows,n_cols) using the theano backend. So across the 7 layers for each pixel, it's one-hot encoded. In this case, is the correct error function to use categorical cross-entropy? It seems that way to me but the network seems to learn better with binary cross-entropy loss. Can someone shed some light on why that would be and what the principled objective is?</p>