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

Getting an error when modifying the faster_rcnn model to add inception_v3 backbone model #3083

Open
js-kalsi opened this issue Dec 1, 2020 · 0 comments
Labels

Comments

@js-kalsi
Copy link

js-kalsi commented Dec 1, 2020

I was following this tutorial Modifying the model to add a different backbone. When I replace the mobilenet_v2 model with inception_v3, the code does not work and gives the following error:

  File "/home/gpu-user/projects/building-outline-detection/src/models/faster_rcnn/vision/engine.py", line 46, in train_one_epoch
    loss_dict = model(images, targets)
  File "/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torchvision/models/detection/generalized_rcnn.py", line 99, in forward
    proposals, proposal_losses = self.rpn(images, features, targets)
  File "/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/gpu-user/miniconda3/envs/faster_rcnn/lib/python3.8/site-packages/torchvision/models/detection/rpn.py", line 330, in forward
    features = list(features.values())
AttributeError: 'InceptionOutputs' object has no attribute 'values'

I am using the following environment:

  • Ubuntu 18.04.4 LTS
  • CUDA Version: 10.2
  • Python: 3.8.6
  • Pytorch: 1.7.0

It will be great if someone can help me in resolving this issue.
Thanks

@zhangguanheng66 zhangguanheng66 transferred this issue from pytorch/pytorch Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants