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

不能正常的推理 #1

Open
cpboost opened this issue Sep 2, 2020 · 5 comments
Open

不能正常的推理 #1

cpboost opened this issue Sep 2, 2020 · 5 comments

Comments

@cpboost
Copy link

cpboost commented Sep 2, 2020

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback
If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

@cpboost
Copy link
Author

cpboost commented Sep 2, 2020

ModuleAttributeError Traceback (most recent call last)
in ()
4 CONFIG_FILE = './work_dirs/vf_r2_base/vfnet_r2_101_fpn_mdconv_c3-c5_mstrain_2x_coco.py'
5 CHECKPOINT_PATH = './work_dirs/vf_r2_base/epoch_20.pth'
----> 6 model = init_detector(CONFIG_FILE, CHECKPOINT_PATH)
7 img1='./data/coco/train2017/train_29635.jpg'
8 # img1='./normal/train_1.jpg'

8 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in getattr(self, name)
770 return modules[name]
771 raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
--> 772 type(self).name, name))
773
774 def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None:

ModuleAttributeError: 'Bottle2neck' object has no attribute 'conv2'

@cpboost cpboost changed the title can 不能正常的推理 Sep 2, 2020
@hyz-xmaster
Copy link
Owner

Commenting delattr(self, 'conv2') in res2net.py can solve this issue.

@cpboost
Copy link
Author

cpboost commented Sep 2, 2020

是这个位置的报的错。但是该如何解决

@hyz-xmaster
Copy link
Owner

Comment delattr(self, 'conv2') <=> # delattr(self, 'conv2')

@cpboost
Copy link
Author

cpboost commented Sep 2, 2020

thank success

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