-
Notifications
You must be signed in to change notification settings - Fork 168
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
Changing the number of classes #9
Comments
Hi @nayriz . Thank you for reporting. That's a bug, change this line in your notebook:
In your case, Let me know if that works |
Dear Daniil, Thank you for your prompt reply. I had already changed that line. I have also changed the following lines:
and
Did you mean to say I should leave those unchanged and only change the line your mentioned? Thanks alot! |
Did that help to resolve your problem? Also check this file: It's a training file for a different dataset where we performed binary segmentation (similar to your problem). |
I had already done that when I submitted the issue, so I guess it doesn't solve my problem. Thank you for pointing out at the other notebook, I'll definitely have a look at it! |
Great! Try it out. Also bear in mind that your labels should be 0 and 1 (background and your class) in the and let me know if you need more help |
Thanks a lot, when you say
you mean for the endovis files, right? For the Pascal Voc the labels should be the class number. Also, it is possible to train the model with resnet_34_8s, right? |
@nayriz I mean that depending on the number of classes in your own dataset Yes, in Endovis we did it with 2 classes and I thought it might be easier for you as you Sorry, the structure is a little bit messy so far -- I will change that in a future. |
Hi there,
First, thanks a lot for the good work, it's really useful!
I am trying to train the model on 1 only one class (that class + background) using the code in resnet_34_8s_train.ipynb in a .py file . I am confident my dataset only has one class, so I change the number of class from 21 to 2, but I get the following error after when starting the first iteration:
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1518238441757/work/torch/lib/THC/generic/THCStorage.cu:58
I just wanted to make sure that for only 1 class, I should set number_of_classes = 2 instead of 21, and that you are able to make work with you home code work with a different number of classes? The full error is below:
The text was updated successfully, but these errors were encountered: