Skip to content
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

您好,我这边在用tusimple数据集跑Bezierlannet的训练时,命令是 python main_landet.py --train --config=configs/lane_detection/bezierlanenet/resnet18_tusimple_aug1b.py,出现了报错,请问您是否能提供解决方案或者建议呢?谢谢您! #180

Open
Diamond88 opened this issue Dec 19, 2024 · 5 comments

Comments

@Diamond88
Copy link

Traceback (most recent call last):
File "main_landet.py", line 76, in
runner.run()
File "/home/ubuntu/code/pytorch-auto-drive/utils/runners/lane_det_trainer.py", line 55, in run
self.model)
File "/home/ubuntu/anaconda3/envs/pad/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/ubuntu/code/pytorch-auto-drive/utils/losses/hungarian_bezier_loss.py", line 150, in forward
loss_seg = self.binary_seg_loss(inputs=outputs['segmentations'], targets=target_segmentations)
File "/home/ubuntu/code/pytorch-auto-drive/utils/losses/hungarian_bezier_loss.py", line 204, in binary_seg_loss
reduction='none') / self.pos_weight_seg
File "/home/ubuntu/anaconda3/envs/pad/lib/python3.6/site-packages/torch/nn/functional.py", line 2538, in binary_cross_entropy_with_logits
raise ValueError("Target size ({}) must be the same as input size ({})".format(target.size(), input.size()))
ValueError: Target size (torch.Size([20, 360, 640, 3])) must be the same as input size (torch.Size([20, 640, 3]))

@voldemortX
Copy link
Owner

Traceback (most recent call last):
File "main_landet.py", line 76, in
runner.run()
File "/home/ubuntu/code/pytorch-auto-drive/utils/runners/lane_det_trainer.py", line 55, in run
self.model)
File "/home/ubuntu/anaconda3/envs/pad/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/ubuntu/code/pytorch-auto-drive/utils/losses/hungarian_bezier_loss.py", line 150, in forward
loss_seg = self.binary_seg_loss(inputs=outputs['segmentations'], targets=target_segmentations)
File "/home/ubuntu/code/pytorch-auto-drive/utils/losses/hungarian_bezier_loss.py", line 204, in binary_seg_loss
reduction='none') / self.pos_weight_seg
File "/home/ubuntu/anaconda3/envs/pad/lib/python3.6/site-packages/torch/nn/functional.py", line 2538, in binary_cross_entropy_with_logits
raise ValueError("Target size ({}) must be the same as input size ({})".format(target.size(), input.size()))
ValueError: Target size (torch.Size([20, 360, 640, 3])) must be the same as input size (torch.Size([20, 640, 3]))

@Diamond88 你这边有修改代码吗,还是直接跑的?

@Diamond88
Copy link
Author

Diamond88 commented Dec 19, 2024 via email

@voldemortX
Copy link
Owner

@Diamond88 奇怪,你可以尝试看一下模型输入时刻图片是否正常么,有h和w

@Diamond88
Copy link
Author

Diamond88 commented Dec 19, 2024 via email

@voldemortX
Copy link
Owner

@Diamond88 如果发现代码有bug欢迎pr修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants