-
Notifications
You must be signed in to change notification settings - Fork 357
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
error in training mobilenet #6
Comments
@kaishijeng I can't reproduce this error, the training script works fine in my working env (Anaconda3, python3.6) . Could you give more details? Any modifications of my code? And your python environment? |
I didn't change your code and previous error may be due to python in make.sh uses python2. python3 train_RFB.py -d VOC -v RFB_mobile -s 300 --basenet weights/mobilenet_feature.pth RFBNet( |
@kaishijeng It seems your pytorch version doesn't support that indexing. Change the line 96 in multibox_loss.py from "loss_c[pos] = 0" to "loss_c[pos.view(-1)]" should fix this incompatibility. |
@kaishijeng If you still suffer from the training script, update the pytorch to 0.3.0 and try again. |
@ruinmessi It works now after changing the line 96 in multibox_loss.py from "loss_c[pos] = 0" to "loss_c[pos.view(-1)]" Thanks |
@kaishijeng Hello, I change python to python3 in make.sh and meet the following error when running make.sh, do you know how to solve it? Thank you ~
|
@ruinmessi
I follow your instruction below to train VOC with mobilenet, but got an error:
python3 train_RFB.py -d VOC -v RFB_mobile -s 300
300 21
Traceback (most recent call last):
File "train_RFB.py", line 88, in
net = build_net('train', img_dim, num_classes)
File "/home/topspin/2TB/src/RFBNet/models/RFB_Net_mobile.py", line 348, in build_net
mbox[str(size)], num_classes), num_classes)
TypeError: init() missing 2 required positional arguments: 'head' and 'num_classes'
Any idea why this happens?
Thanks,
The text was updated successfully, but these errors were encountered: