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

setup.py and .pth #19

Open
yunshangyue71 opened this issue Jul 2, 2020 · 6 comments
Open

setup.py and .pth #19

yunshangyue71 opened this issue Jul 2, 2020 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@yunshangyue71
Copy link

yunshangyue71 commented Jul 2, 2020

I find there is no setup.py and the pre_trained model which you offer is not match the network.
I think you trained the model on another script which you not offer ,recently you improved your script, but you didn't retrained .

@GoGoDuck912
Copy link
Owner

GoGoDuck912 commented Jul 3, 2020

  1. The current code base adopts the implementation of InplaceSyncBN from https://github.com/mapillary/inplace_abn. The compiling of the InplaceSyncBN operator will be automatically triggered when running the code.

  2. Our former codebase is based on pytorch version 0.4. However, we only made minor modifications regarding pytorch version difference, and upgrade to pytorch>1.0 for simplicity usage. From my side, the current provided pre-trained model matches the network configuration. As we have organized the code for easy reading, please do not mix the former code base with the current one. Please clarify what kind of mismatch you met.

@yunshangyue71
Copy link
Author

yunshangyue71 commented Jul 3, 2020

After killing several bugs that produced by my environment.The major bug apper.
(pytorch15) q30004136:/SCHP_org$ python train.py
Traceback (most recent call last):
File "train.py", line 25, in
import networks
File "/data_ssd3/q30004136/SCHP_org/networks/init.py", line 3, in
from networks.AugmentCE2P import resnet101
File "/data_ssd3/q30004136/SCHP_org/networks/AugmentCE2P.py", line 21, in
from modules import InPlaceABNSync
File "/data_ssd3/q30004136/SCHP_org/modules/init.py", line 1, in
from .bn import ABN, InPlaceABN, InPlaceABNSync
File "/data_ssd3/q30004136/SCHP_org/modules/bn.py", line 10, in
from .functions import *
File "/data_ssd3/q30004136/SCHP_org/modules/functions.py", line 18, in
extra_cuda_cflags=["--expt-extended-lambda"])
File "/data_ssd3/q30004136/anaconda3/envs/pytorch15/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 921, in load
is_python_module)
File "/data_ssd3/q30004136/anaconda3/envs/pytorch15/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1120, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "/data_ssd3/q30004136/anaconda3/envs/pytorch15/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1441, in _import_module_from_library
file, path, description = imp.find_module(module_name, [path])
File "/data_ssd3/q30004136/anaconda3/envs/pytorch15/lib/python3.7/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'inplace_abn'
(pytorch15) q30004136:
/SCHP_org$

my environment is CUDA 10.2 ,ubuntu 18.0.4,python3.7
The error is there is no inplace_abn model .Do i need download the inplace_abn from https://github.com/mapillary/inplace_abn
and then put into the project?
when i run this command :pip install inplace_abn.it says that: Requirement already satisfied: inplace_abn in /data_ssd3/q30004136/anaconda3/envs/pytorch15/lib/python3.7/site-packages/inplace_abn-0.0.0-py3.7-linux-x86_64.egg (0.0.0)

i don't kown how to solve this problem. I need your help please.

@GoGoDuck912
Copy link
Owner

You don't need to install inplace_abn by yourself. The current code base already contains the inplace_abn implementation in ./modules. And the compiling of the InplaceSyncBN operator will be automatically triggered when running the code.

@yunshangyue71
Copy link
Author

I have tried several times ,it always the same error.

File "/data_ssd3/q30004136/SCHP_org/modules/functions.py", line 18, in
extra_cuda_cflags=["--expt-extended-lambda"])
ImportError: No module named 'inplace_abn'

How do i solve this problem?thank you very much!

@GoGoDuck912 GoGoDuck912 added the help wanted Extra attention is needed label Jul 6, 2020
@amandazw
Copy link

amandazw commented Jul 8, 2021

@yunshangyue71 ImportError: No module named 'inplace_abn' did you solve this?

@xhxbuaa
Copy link

xhxbuaa commented Jul 2, 2024

I met the same problem,have you solved it? my environment is cuda11.2 , pytorch 1.5.1
envs/schp/lib/python3.8/imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'inplace_abn'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants