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

Some problem when running test.py and train.py #58

Closed
pp00704831 opened this issue Dec 24, 2019 · 18 comments
Closed

Some problem when running test.py and train.py #58

pp00704831 opened this issue Dec 24, 2019 · 18 comments

Comments

@pp00704831
Copy link

Hi, I am a beginner in deep learning.
Some problem occurred when I was running the code.
First, I use the command 「 tar -xvf encnet_jpu_res50_pcontext.pth.tar 」 to extract the tar file, but it fails.
Second, if i successfully extract the file and get checkpoint, which file should I put my checkpoint in ? Where should I extract my checkpoint file to?
Thank You!

@wuhuikai
Copy link
Owner

It's not a tar file. Directly put the file into a folder and use it with --resume.

@pp00704831
Copy link
Author

Thanks you, so where should I put my file ? You means that when I successfully put my file,
and use --resume encnet_jpu_res50_pcontext.pth.tar then I can run the test.py ?
我也會說中文,我們也可以用中文對談, 謝謝你。

@pp00704831
Copy link
Author

Because I did not see this problem pages before, so maybe I should find the answers here, thank you for your quickly reply.

@wuhuikai
Copy link
Owner

You're right, using --resume to run test.py.

@pp00704831
Copy link
Author

Hello, I met this problem:
/home/tsai/anaconda3/envs/python3.5/lib/python3.5/site-packages/torch/nn/functional.py:2351: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
Segmentation fault (core dumped)

I used the environment python=3.5 , pytorch1.0 , cuda=9.0
Do I need to change nn.functional.upsample into nn.functional.interpolate ? I think that I should not change the original better.
Thank you

@wuhuikai
Copy link
Owner

What's your OS? The code is only tested on Ubuntu 16.04 LTS.

@pp00704831
Copy link
Author

I used Ubuntu 18.04, so It can't run train.py and test.py on the Ubuntu 18.04 system?

@wuhuikai
Copy link
Owner

I'm not sure about this.

@pp00704831
Copy link
Author

Okay, I will first change the python 3.5 to python 3.6 first, sorry for bothering you so many times.

@wuhuikai
Copy link
Owner

wuhuikai commented Dec 26, 2019 via email

@pp00704831
Copy link
Author

Well... after I reinstalled the datasets , it could work smoothly. Thank you very much.

@pp00704831
Copy link
Author

Hello, I want to retrain on the model, but I want to use the checkpoint you have gave for testing
' encnet_jpu_res50_pcontext.pth.tar '
So could I use the command like that for more training based on these parameters?
python train.py --dataset pcontext
--model encnet --jpu --aux --se-loss
--backbone resnet50 --checkname encnet_res50_pcontext ----resume encnet_jpu_res50_pcontext.pth.tar

Because I want to do some simple experiment I don't want to train too many epochs
Thanks you!

@wuhuikai
Copy link
Owner

Please use --ft and use > 1 GPU.

@pp00704831
Copy link
Author

Thanks you very much! I will try that.

@pp00704831
Copy link
Author

Sorry to bother you again.
Because I want to do some experiment on the loss function, I added other loss function on it , but when I import the function code, it seems that it can not directly import other function.
I added the code in customize.py .
Selection_003
My question is that whether we need to do some changes on setup.py ?
Because I think the error might come from that.
Sorry to bother you so many times, I very appreciate your assistance.

@pp00704831
Copy link
Author

I have successfully modified it, but I still feel strange why we can not import the code from other ?
I modified it by writing them in the same code rather than call(import) from other code.
Thanks you very much!

@wuhuikai
Copy link
Owner

There're 2 ways:

  1. If you install by python setup.py install, you need to uninstall and reinstall it after modification.
  2. Installing by python setup.py develop

@pp00704831
Copy link
Author

I got it! Thanks 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

2 participants