CasiaFan / tensorflow_retinanet

RetinaNet with Focal Loss implemented by Tensorflow
121 stars 45 forks source link

same inputs as tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits, labels=gclasses) #8

Closed DRosemei closed 6 years ago

DRosemei commented 6 years ago

Thanks for your sharing. But I get a problem. I use same inputs as tf.nn.sparse_softmax_cross_entropy_with_logits(logits=logits, labels=gclasses) ,logits has shape(69856, 4) ,and gclasses has shape(69856,) . So predictions_pt = tf.where(tf.equal(onehot_labels, 1.0), predictions, 1.-predictions) will put an error. I want to know if your inputs are the same as" tf.nn.sparse_softmax_cross_entropy_with_logits", and what dose your input shape?

DRosemei commented 6 years ago

I have found the solution. Thanks for your sharing again.