Loading weights into state dict...
Finished!
Start Train
Epoch 1/50: 0%| | 0/73 [00:01<?, ?it/s<class 'dict'>]
Traceback (most recent call last):
File "", line 1, in
File "/home/white/software/pycharm-2021.1.3/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/home/white/software/pycharm-2021.1.3/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/train.py", line 277, in
fit_one_epoch(net,yolo_loss,epoch,epoch_size,epoch_size_val,gen,gen_val,Freeze_Epoch,Cuda)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/train.py", line 69, in fit_one_epoch
loss_item, num_pos = yolo_loss(outputs[i], targets)
File "/home/white/anaconda3/envs/torch12/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/nets/yolo_training.py", line 187, in forward
mask, noobj_mask, t_box, tconf, tcls, box_loss_scale_x, box_loss_scale_y = self.get_target(targets, scaled_anchors,in_w, in_h,self.ignore_threshold)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/nets/yolo_training.py", line 343, in get_target
tcls[b, best_n, gj, gi, target[b][i, 4].long()] = 1
IndexError: index 8 is out of bounds for dimension 4 with size 7
Loading weights into state dict... Finished! Start Train Epoch 1/50: 0%| | 0/73 [00:01<?, ?it/s<class 'dict'>] Traceback (most recent call last): File "", line 1, in
File "/home/white/software/pycharm-2021.1.3/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/home/white/software/pycharm-2021.1.3/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/train.py", line 277, in
fit_one_epoch(net,yolo_loss,epoch,epoch_size,epoch_size_val,gen,gen_val,Freeze_Epoch,Cuda)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/train.py", line 69, in fit_one_epoch
loss_item, num_pos = yolo_loss(outputs[i], targets)
File "/home/white/anaconda3/envs/torch12/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/nets/yolo_training.py", line 187, in forward
mask, noobj_mask, t_box, tconf, tcls, box_loss_scale_x, box_loss_scale_y = self.get_target(targets, scaled_anchors,in_w, in_h,self.ignore_threshold)
File "/home/white/PycharmProjects/myolov4-lite/mobilenet-yolov4-lite-pytorch-main/nets/yolo_training.py", line 343, in get_target
tcls[b, best_n, gj, gi, target[b][i, 4].long()] = 1
IndexError: index 8 is out of bounds for dimension 4 with size 7