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

Kernel dies when trying to run PyTorch code on Linux #5060

Closed
ccordoba12 opened this issue Aug 25, 2017 · 11 comments
Closed

Kernel dies when trying to run PyTorch code on Linux #5060

ccordoba12 opened this issue Aug 25, 2017 · 11 comments

Comments

@ccordoba12
Copy link
Member

Please see this SO question for the details:

https://stackoverflow.com/questions/45875837/spyder-just-kernel-died-restarting-when-i-run-net-forward-in-pytorch

@andfoy, please take a look at this one.

@andfoy
Copy link
Member

andfoy commented Aug 25, 2017

@ccordoba12 Does mixing Spyder versions from PyPi and conda might have some responsibility here? According to the package dump posted by the user, Spyder 3.1.4 and 3.2.1 are both listed:

spyder                    3.2.1                     <pip>
spyder                    3.1.4                    py27_0

@ccordoba12
Copy link
Member Author

Probably, but did you try to run the OP code?

@andfoy
Copy link
Member

andfoy commented Aug 25, 2017

The code posted by the OP works as expected:
captura de pantalla de 2017-08-25 11-40-05

Actually, it works if I use a deeper model such as the ResNet-101:

captura de pantalla de 2017-08-25 11-42-42

It works also on the GPU

@selous123
Copy link

Thank you very much for your answering.

also i run this code with the same version in my other computer.it works well!!!

I try to solve the mixing version problem. delete the redundant package 3.1.4.but still "kernel died,restarting"

first I doubt whether Spyder and pytorch have collision in the kernel.
Obviously,The problem should be in the configuration of my own computer
Sadly,there is no error message in the terminal about the kernel died

selection_014

@ccordoba12
Copy link
Member Author

It seems this is fixed in the latest version of PyTorch:

jupyter/notebook#2784 (comment)

@selous123
Copy link

not only it has errors in the spyder,but also in jupyter and terminal..

Problem Description

@selous123
Copy link

Just now,I update all the packages in anaconda

conda update --all

delightedly the code runs well in terminal and jupyter,but the error in the spyder also exists

@andfoy
Copy link
Member

andfoy commented Aug 28, 2017

Well, I'm running the latest package versions on my current setup, and it works as expected. Any ideas @ccordoba12 ?

@andfoy
Copy link
Member

andfoy commented Aug 28, 2017

Also, the user reports that on a new installation, the package works. @selous123 Have you tried to create a new conda environment on your conflicting PC?

@selous123
Copy link

everything goes well

when i use Source installation instead of "pip install..." as official website proposal to reinstall my pytorch and it works.

thank you very much

@andfoy andfoy removed this from the v3.2.x milestone Aug 29, 2017
@andfoy
Copy link
Member

andfoy commented Aug 29, 2017

@selous123 For future installations, PyTorch developers recommend to install the package using conda:

conda install pytorch torchvision -c soumith

I'm glad that it works as expected

@andfoy andfoy closed this as completed Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants