How can I use different loss functions for images with different labels in tensorflow?
This is not possible, for 2 reasons:


It doesn't make mathematical sense. The Gradient must explore one loss function that is optimized to distinguish between more than one class. Using a loss function to classify a single class is equivalent to not learning anything.
In ML, the models you train are meant to generalize on data they have never seen before. Because of this, you can't use different loss functions because once you test its performance on test data nobody knows to what class they belong.