-
Notifications
You must be signed in to change notification settings - Fork 64
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
No module named 'resample2d_package' #6
Comments
I also encounter this problem. Does anyone know why this is happening and how to fix it? |
Can you show the command that you encountered this problem? |
Just import every modules with from .xxx[module path] import XXX[module name], like from .resample2d_package.modules.resample2d import Resample2d in every python files in networks directory.
…------------------ 原始邮件 ------------------
发件人: "Min Sheng, Wu"<[email protected]>;
发送时间: 2019年1月9日(星期三) 上午10:20
收件人: "phoenix104104/fast_blind_video_consistency"<[email protected]>;
抄送: "刘光忠"<[email protected]>; "Author"<[email protected]>;
主题: Re: [phoenix104104/fast_blind_video_consistency] No module named'resample2d_package' (#6)
I also encounter this problem. Does anyone know why this is happening and how to fix it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for all the hints. I also have the same issue: I used the make.sh from resample2d_package and still get the same error (this "make .sh step" is not indicated in the readme file on the code page at the github of this work) I tried with the "import every modules with from .xxx[module path] import XXX[module name]" from .FlowNet2 import * So I copied all of these to every py file on networks, i get: Then I tried with: from .FlowNet2 import * So I copied all of these to every py file on networks, i get: ModuleNotFoundError: No module named 'submodules' Finally, I tried: from .FlowNet2 import * from resample2d_package.modules.resample2d import Resample2d And get the same error at the beginning Please note there is not "from .resample2d_package.modules.resample2d import Resample2d" module I am working on colab, cuda 10.0, torch 0.4.0. Any help would be very appreciated |
In the .py files at the networks folder I changed some of the imports: from resample2d_package.modules.resample2d import Resample2d Basically, I added networks. to the imports from networks.resample2d_package.modules.resample2d import Resample2d I think this solve the problem of the import Now I am using Cuda 9.0.176, torch 0.4.0, gcc 6.5.0 and g++ 6.5.0 (on Colab) Now, when I use the !python test_pretrained.py -dataset DAVIS -task WCT/wave I get TypeError: a bytes-like object is required, not 'str' Do I have to download some of the dataset? are they neccessary to work on a new video? Thanks |
Could you tell me which line reported an error
…------------------ 原始邮件 ------------------
发件人: "rodrigosilvafe"<[email protected]>;
发送时间: 2019年2月27日(星期三) 凌晨0:24
收件人: "phoenix104104/fast_blind_video_consistency"<[email protected]>;
抄送: "刘光忠"<[email protected]>; "Author"<[email protected]>;
主题: Re: [phoenix104104/fast_blind_video_consistency] No module named'resample2d_package' (#6)
In the .py files at the networks folder I changed some of the imports:
from resample2d_package.modules.resample2d import Resample2d
from channelnorm_package.modules.channelnorm import ChannelNorm
from submodules import *
from ConvLSTM import ConvLSTM
Basically, I added networks. to the imports
from networks.resample2d_package.modules.resample2d import Resample2d
from networks.channelnorm_package.modules.channelnorm import ChannelNorm
from networks.submodules import *
from networks.ConvLSTM import ConvLSTM
I think this solve the problem of the import
Now I am using Cuda 9.0.176, torch 0.4.0, gcc 6.5.0 and g++ 6.5.0 (on Colab)
Now, when I use the !python test_pretrained.py -dataset DAVIS -task WCT/wave I get TypeError: a bytes-like object is required, not 'str'
Do I have to download some of the dataset? are they neccessary to work on a new video?
Thanks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for the reply When I use: python test_pretrained.py -dataset DAVIS -task WCT/wave I get: Namespace(cuda=True, data_dir='data', dataset='DAVIS', gpu=0, list_dir='lists', phase='test', redo=False, size_multiplier=4, task='WCT/wave') Thanks again |
File "test_pretrained.py", line 47,you need change the 'with open(opts_filename, 'r') as f:' into 'with open(opts_filename, 'rb') as f:'
…------------------ 原始邮件 ------------------
发件人: "rodrigosilvafe"<[email protected]>;
发送时间: 2019年2月27日(星期三) 中午11:03
收件人: "phoenix104104/fast_blind_video_consistency"<[email protected]>;
抄送: "刘光忠"<[email protected]>; "Author"<[email protected]>;
主题: Re: [phoenix104104/fast_blind_video_consistency] No module named'resample2d_package' (#6)
Thanks for the reply
When I use:
python test_pretrained.py -dataset DAVIS -task WCT/wave
I get:
Namespace(cuda=True, data_dir='data', dataset='DAVIS', gpu=0, list_dir='lists', phase='test', redo=False, size_multiplier=4, task='WCT/wave')
Load pretrained_models/ECCV18_blind_consistency_opts.pth
Traceback (most recent call last):
File "test_pretrained.py", line 48, in
model_opts = pickle.load(f)
TypeError: a bytes-like object is required, not 'str'
Thanks again
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks, that solved the TypeError |
Add " sys.path.append('./networks') " before " ### custom lib " will solve the import error. |
Thank you so much. it did work finally |
Hello, dear friend, |
No description provided.
The text was updated successfully, but these errors were encountered: