I'm trying to use 'inception resnet v2.py'
to do a multi-label classification.
I used sigmoid, but the result is not good.
Do you know exactly where to change?
https://github.com/tensorflow/models/tree/master/research/slim
"train_image_classifier.py"
has been changed to sigmoid, but results are as good as using softmax.
Do I have to change it from "inception resnet v2.py"
in the "net" folder?
if 'AuxLogits' in end_points:
slim.losses.sigmoid_cross_entropy(
end_points['AuxLogits'], labels,
label_smoothing=FLAGS.label_smoothing, weights=0.4,
scope='aux_loss')
slim.losses.sigmoid_cross_entropy(
logits, labels, label_smoothing=FLAGS.label_smoothing, weights=1.0)
return end_points
If put in a color red and 4 wheel drive car image, It would be nice if it came out like this, but it is not.
Car [0.99]
4 wheel drive [0.99]
color red [0.99]
In reality, everyone guessed right, but it comes out as if using softmax.
Car [0.99]
4 wheel drive [0.03]
color red [0.009]