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

How to use 'inplace_abn' module? #4

Open
Rashfu opened this issue Jul 28, 2021 · 0 comments
Open

How to use 'inplace_abn' module? #4

Rashfu opened this issue Jul 28, 2021 · 0 comments

Comments

@Rashfu
Copy link

Rashfu commented Jul 28, 2021

The code couldn't run as wish. I have run sudo apt-get install ninja-build on ubuntu18.04, but the error is as below:

Traceback (most recent call last):
  File "/home/dell/Codes/mono2++/train.py", line 3, in <module>
    from trainer import Trainer
  File "/home/dell/Codes/mono2++/trainer.py", line 19, in <module>
    import networks
  File "/home/dell/Codes/mono2++/networks/__init__.py", line 5, in <module>
    from .encoder_selfattn import get_resnet101_asp_oc_dsn
  File "/home/dell/Codes/mono2++/networks/encoder_selfattn.py", line 12, in <module>
    from networks.util import conv3x3, Bottleneck
  File "/home/dell/Codes/mono2++/networks/util.py", line 12, in <module>
    from inplace_abn.bn import InPlaceABNSync, InPlaceABN
  File "/home/dell/Codes/mono2++/inplace_abn/__init__.py", line 1, in <module>
    from .bn import ABN, InPlaceABN, InPlaceABNSync
  File "/home/dell/Codes/mono2++/inplace_abn/bn.py", line 9, in <module>
    from inplace_abn.functions import *
  File "/home/dell/Codes/mono2++/inplace_abn/functions.py", line 9, in <module>
    _backend = load(name="inplace_abn",
  File "/home/dell/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1079, in load
    return _jit_compile(
  File "/home/dell/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1317, in _jit_compile
    return _import_module_from_library(name, build_directory, is_python_module)
  File "/home/dell/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1699, in _import_module_from_library
    file, path, description = imp.find_module(module_name, [path])
  File "/home/dell/anaconda3/envs/pytorch/lib/python3.8/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'inplace_abn'

Process finished with exit code 1

It seems that the customized module inplace_abn doesn't compile successfully.
How to fix it? Thank you~

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

1 participant