Closed wang-tf closed 4 years ago
Hmm, that error occurred because you are supposed to use Binary loss instead (since the shape is (batch, n_box, 1) class is either 0 or 1 => binary). The thing is, you can't just have 1 class in object detection. You will always end up with n_class + 1 (the background is one class itself).
To be short, check n_class setting first. You are probably setting it to zero.
Yes, you are right. The problem is the NUM_CLASS setting. It need including background.
Thanks for your work! While after I changed the default box format to:
The error was raised like:
It likey occured when using tf.keras.losses.SparseCategoricalCrossentropy. And my input tensors' shape were printed like 'gt_confs: (6, 60716), confs: (6, 60716, 1)' Could you help me to find my error or give me some advices?