Skip to content
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 error #140

Open
the-cat-crying opened this issue Aug 2, 2022 · 2 comments
Open

training error #140

the-cat-crying opened this issue Aug 2, 2022 · 2 comments

Comments

@the-cat-crying
Copy link

Traceback (most recent call last):
File "train.py", line 395, in
main()
File "train.py", line 322, in main
train(cfg, train_loader, model, criterion, optimizer, scaler,
File "/home/zhoup/work/download_source_code/yolop/lib/core/function.py", line 77, in train
total_loss, head_losses = criterion(outputs, target, shapes,model)
File "/home/zhoup/anaconda3/envs/yolop/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in call_impl
return forward_call(input, **kwargs)
File "/home/zhoup/work/download_source_code/yolop/lib/core/loss.py", line 50, in forward
total_loss, head_losses = self._forward_impl(head_fields, head_targets, shapes, model)
File "/home/zhoup/work/download_source_code/yolop/lib/core/loss.py", line 70, in _forward_impl
tcls, tbox, indices, anchors = build_targets(cfg, predictions[0], targets[0], model) # targets
File "/home/zhoup/work/download_source_code/yolop/lib/core/postprocess.py", line 79, in build_targets
print("
"*10, gj.clamp
(0, gain[3] - 1))
RuntimeError: result type Float can't be cast to the desired output type long int

@congwei45
Copy link

I meet the same problem!

@realTravisYou
Copy link

The version of pytorch should be 1.7.0

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

3 participants