-
Notifications
You must be signed in to change notification settings - Fork 616
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
训练报错 #42
Comments
1.应该是版本问题,将P4 = torch.cat([P4,P5_upsample],axis=1) 改为 P4 = torch.cat([P4,P5_upsample],1 应该可以解决) 不知道上述解决方法是否存在bug,如果有,请告知,谢谢! |
你好博主,非常感谢解答,问题已按照上述语句解决,即添加了: 同时还有2处: |
这应该是版本问题吧,我忘了是高还是低的情况下是dim |
equal_flag = torch.Tensor(0).cuda()会不会写错了?我查了PyTorch文档,self.bool() is equivalent to self.to(torch.bool),改成mask.to(torch.bool)会不会更合适?链接:https://pytorch.org/docs/stable/tensors.html |
equla_flag写错了吧,应该得是1,否则的话loss_loc不会被启用。 |
你好博主,非常感谢分享。
我在按照提示的步骤进行训练时出现了如下的错误:
1 . Traceback (most recent call last):
File "yolov4-pytorch-master\nets\yolo4.py", line 129, in forward
P4 = torch.cat([P4,P5_upsample],axis=1)
TypeError: cat() got an unexpected keyword argument 'axis' (已将axis改成dim,请问这个是版本原因还是?)
2. Traceback (most recent call last):
File "yolov4-pytorch-master\nets\yolo_training.py", line 167, in forward
ciou = (1 - box_ciou( pred_boxes_for_ciou[mask.bool()], t_box[mask.bool()]))* box_loss_scale[mask.bool()]
AttributeError: 'Tensor' object has no attribute 'bool'(请问这个问题怎么进行修改呢?)
The text was updated successfully, but these errors were encountered: