# Loss function for classifying when more than one output can be 1 at a time

My desired output is not 1-hot encoding, but like a 10 D vector: [1, 0, 1, 0, 1, 0, 0, 1, 1, 1] and the input is like the normal MNIST data set.

I want to use TensorFlow to build a model to learn this, then which loss function should I choose?

• It looks like you are performing multilabel classfication; e.g., if there are potentially multiple digits in one output. If so, use the cross entropy. – Emre Nov 16 '16 at 5:22