You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
命令:python train.py --mode yolov7 --use_aux True --data garbage.yaml --cfg yolov7.yaml --weights weights/yolov7/yolov7.pt --batch-size 8
出现错误
**Logging results to runs/train/exp14
Starting training for 100 epochs...
Epoch gpu_mem box obj cls labels img_size
0%| | 0/5 [00:01<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 772, in
main(opt)
File "train.py", line 670, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 448, in train
loss, loss_items = compute_loss(pred, targets.to(device), imgs) # init loss class
File "YOLOU/utils/loss.py", line 992, in call
bs_aux, as_aux_, gjs_aux, gis_aux, targets_aux, anchors_aux = self.build_targets2(p[:self.nl], targets, imgs)
File "YOLOU/utils/loss.py", line 1202, in build_targets2
indices, anch = self.find_5_positive(p, targets)
File "YOLOU/utils/loss.py", line 1388, in find_5_positive
indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices
RuntimeError: result type Float can't be cast to the desired output type long int
**
The text was updated successfully, but these errors were encountered:
命令:python train.py --mode yolov7 --use_aux True --data garbage.yaml --cfg yolov7.yaml --weights weights/yolov7/yolov7.pt --batch-size 8
出现错误
**Logging results to runs/train/exp14
Starting training for 100 epochs...
0%| | 0/5 [00:01<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 772, in
main(opt)
File "train.py", line 670, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 448, in train
loss, loss_items = compute_loss(pred, targets.to(device), imgs) # init loss class
File "YOLOU/utils/loss.py", line 992, in call
bs_aux, as_aux_, gjs_aux, gis_aux, targets_aux, anchors_aux = self.build_targets2(p[:self.nl], targets, imgs)
File "YOLOU/utils/loss.py", line 1202, in build_targets2
indices, anch = self.find_5_positive(p, targets)
File "YOLOU/utils/loss.py", line 1388, in find_5_positive
indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices
RuntimeError: result type Float can't be cast to the desired output type long int
**
The text was updated successfully, but these errors were encountered: