Skip to content

how to run train.py??? #51

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

Open
237014845 opened this issue Jan 17, 2019 · 2 comments
Open

how to run train.py??? #51

237014845 opened this issue Jan 17, 2019 · 2 comments

Comments

@237014845
Copy link

python train.py
==> Preparing data..

Epoch: 0
Traceback (most recent call last):
File "train.py", line 114, in
train(epoch)
File "train.py", line 75, in train
loss = criterion(loc_preds, loc_targets, cls_preds, cls_targets)
File "/home/hs/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/hs/hs/pytorch/pytorch-retinanet-580/loss.py", line 99, in forward
print('loc_loss: %.3f | cls_loss: %.3f' % (loc_loss.item()/num_pos, cls_loss.item()/num_pos), end=' | ')
File "/home/hs/anaconda3/lib/python3.6/site-packages/torch/tensor.py", line 320, in rdiv
return self.reciprocal() * other
RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor

@237014845
Copy link
Author

anyone can help me??

@Imagery007
Copy link

1.Run script get_state_dict.py first to get a base model.
2.Put the generated model in model/net.pth.
3.Then start the training with python train.py --lr 0.001.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants