-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Training on new dataset #37
Comments
Dear @Worulz, num_classes = Number of Classes in your data set + 1 (For background)
# Example, in your case:
num_classes = 38 # because 37 + 1= 38 & when you want to use Focal Loss then you must set: num_classes = Number of Classes in your data set
# Example, in your case:
num_classes = 37 # because you have really 37 object classes Note that these mentioned changes must apply in Line 91 in 6291f3e
Line 36 in 6291f3e
Good Luck |
Thank you for your guidance. I have made the changes. I've changed it to match my classes then +1 for background. Here: Line 37 in 6291f3e
and here: Line 91 in 6291f3e
I still experience the same error.
It happens in SSD loss when my cls_target has the last class feeding into it. It's very weird. It means there is a class mis-match. Is there a dependency anywhere else? |
Dear @Worulz, |
@ahkarami thanks for the help. I'll give it a try again. I assume I may have an error when writing my own example scripts. |
I'm attempting to train on a new dataset but I'm having trouble understanding where I should change my classes.I've changed it when feeding in the network. box_coder and multiloss box.
I'm having an error here when I feed in my network.
torchcv/torchcv/models/ssd/box_coder.py
Line 88 in 6291f3e
I've removed the 1 + and was able to continue training, but I'm sure this isn't the correct fix.
When I have 37 classes, including background at 0 index. What is the class number I should feed into the network?
The text was updated successfully, but these errors were encountered: