YOLOP icon indicating copy to clipboard operation
YOLOP copied to clipboard

training error

Open the-cat-crying opened this issue 2 years ago • 1 comments

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

the-cat-crying avatar Aug 02 '22 01:08 the-cat-crying

I meet the same problem!

congwei45 avatar Aug 28 '22 07:08 congwei45