ImportError: No module named misc.resnet_utils (while running the prepro_feats.py)
See original GitHub issueI had this issue trying to run scripts/prepro_feats.py. Looks like the script could not import the above module misc.
Worked for me changing the prepro_feats.py on lines 49 and 50 to:
from ..misc.resnet_utils import myResnet
import ..misc.resnet as resnet
and running (from the above repo’s path):
python -m self_critical.scripts.prepro_feats --input_json self_critical/data/dataset_coco.json --output_dir self_critical/data/cocotalk --images_root $IMAGE_ROOT --model_root self_critical/data/imagenet_weights/
Notice that I changed the repo’s name to avoid conflict (Not sure if it’s necessary).
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Pytest/Locust: ModuleNotFoundError No module named
If you want to execute locust at sub-folder and module not found still happened, try Step 3. Within instr_performance.py, append parent path ...
Read more >ModuleNotFoundError: No module named x
A python package can contain any number of nested sub-packages, i.e. packages that contain other packages down the hierarchy of the project ...
Read more >How to fix ModuleNotFoundError: No module named 'skmisc'?
Depending on how your system is set up, this command pip install --user scikit-misc could be installing the package for Python v2, while...
Read more >No module named misc - How to resolve this when installing ...
After installing deeptools, I try and execute ./bamCoverage; I get this error. Traceback (most recent call last): File "./bamCoverage", line 4, in <module>...
Read more >Fix ModuleNotFoundError (No Module Named Requests ...
python #error #fix #fixed #howto Hey guys in this tutorial let's try to fix ModuleNotFoundError No module named error in cases where the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
changing lines 49 and 50 from …misc.resnet_utils import myResnet form …misc import resnet works for me
Indeed I think changing repo’s name is necessary for me, I have to get rid of ‘.’ in the repo’s name to make it work. I also run it from above the repo’s path, didn’t try running from repo’s root path
Do you still have the problem with the master branch?