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
shpe mismatch in loss.py #2
Comments
@johnlanbor |
nothing but except data path(absolute path, not soft link), pretrained model path. |
@johnlanbor |
@johnlanbor |
@sfzhang15 I tried run this code in two different devide too. and redownload it. The full log is as below. OS: Ubuntu 16.04.4 LTS Python version: 3.6 Nvidia driver version: 418.39 Versions of relevant libraries: 2019-12-08 15:36:44,188 atss_core INFO: Running with config: |
The bugs is caused by this line. so , I checked this two tensor shape. Its always the same size. but pytorch report shape mismatch assert. Thats so weird. |
@johnlanbor |
@i Solved this issue by change pytorch version ro 1.1.0. Thanks a lot! |
I encontered the same problem, my pytorch version is 1.3.0+cu100, is there any way other than downgrad pytroch to 1.1 of solving the problem? |
@anthony123 |
@anthony123 We have updated the code, and hope it works. |
It works for me, thanks a lot |
Traceback (most recent call last): File "tools/train_net.py", line 192, in <module> main() File "tools/train_net.py", line 185, in main model = train(cfg, args.local_rank, args.distributed) File "tools/train_net.py", line 79, in train arguments, File "/home/wangqian/ATSS/atss_core/engine/trainer.py", line 69, in do_train loss_dict = model(images, targets) File "/home/wangqian/anaconda3/envs/torch1.3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__ result = self.forward(*input, **kwargs) File "/home/wangqian/anaconda3/envs/torch1.3/lib/python3.6/site-packages/torch/nn/parallel/distributed.py", line 442, in forward output = self.module(*inputs[0], **kwargs[0]) File "/home/wangqian/anaconda3/envs/torch1.3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__ result = self.forward(*input, **kwargs) File "/home/wangqian/ATSS/atss_core/modeling/detector/generalized_rcnn.py", line 50, in forward proposals, proposal_losses = self.rpn(images, features, targets) File "/home/wangqian/anaconda3/envs/torch1.3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__ result = self.forward(*input, **kwargs) File "/home/wangqian/ATSS/atss_core/modeling/rpn/atss/atss.py", line 210, in forward return self._forward_train(box_cls, box_regression, centerness, targets, anchors) File "/home/wangqian/ATSS/atss_core/modeling/rpn/atss/atss.py", line 216, in _forward_train box_cls, box_regression, centerness, targets, anchors File "/home/wangqian/ATSS/atss_core/modeling/rpn/atss/loss.py", line 239, in __call__ labels, reg_targets = self.prepare_targets(targets, anchors) File "/home/wangqian/ATSS/atss_core/modeling/rpn/atss/loss.py", line 178, in prepare_targets ious[candidate_idxs[is_pos[:, ng] == 1, ng], ng] RuntimeError: shape mismatch: value tensor of shape [6] cannot be broadcast to indexing result of shape [5]
The text was updated successfully, but these errors were encountered: