Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix 'The kernel appears to have died. It will restart automatically" caused by pytorch

I have a strange problem with Pytorch. When I use torch functions with tensors like tensor.reshape or torch.transpose, I don't have any problems; even when I created networks, it's ok. However, when I want to train network my jupyter crashed.

crashed

I find where error is but I don't know why it is there and how to fix it.

errors

I installed pytorch using conda. I have Ubuntu 18.04. I don't have cuda.

like image 481
Elvar G Avatar asked Sep 03 '25 01:09

Elvar G


1 Answers

The hint for the solution is available, via the Jupyter notebook terminal (if opened it directly and not via the anaconda interface), where a more proper error code appears

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program....

which then leads to a working solution here sklearn OMP: Error #15 when fitting models

like image 191
Guy Louzon Avatar answered Sep 04 '25 21:09

Guy Louzon