We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我用的dota数据做了一下训练,但是每次到独热编码那一块就会报错为RuntimeError: Class values must be smaller than num_classes.
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last): File "train.py", line 552, in fit_one_epoch(model_train, model, ema, yolo_loss, loss_history, eval_callback, optimizer, epoch, epoch_step, epoch_step_val, gen, gen_val, UnFreeze_Epoch, Cuda, fp16, scaler, save_period, save_dir, local_rank) File "/root/yolov7obb/utils/utils_fit.py", line 34, in fit_one_epoch loss_value = yolo_loss(outputs, targets, images) File "/root/yolov7obb/nets/yolo_training.py", line 104, in call bs, as_, gjs, gis, targets, anchors = self.build_targets(predictions, targets, imgs) File "/root/yolov7obb/nets/yolo_training.py", line 346, in build_targets gt_cls_per_image = F.one_hot(this_target[:, 1].to(torch.int64), self.num_classes).float().unsqueeze(1).repeat(1, pxyxys.shape[0], 1) RuntimeError: Class values must be smaller than num_classes. 报错是这个
Sorry, something went wrong.
已经解决了是我自己没有安排好数据集
No branches or pull requests
我用的dota数据做了一下训练,但是每次到独热编码那一块就会报错为RuntimeError: Class values must be smaller than num_classes.
The text was updated successfully, but these errors were encountered: