Keras lesson 1 - kernel always restart

Hi guys,

I just installed Keras and Tensorflow-gpu on my paperspace account.
Then I launched my keras_lesson1 notebook and everytime I launch this section of code :slight_smile:

import numpy as np
from keras.preprocessing.image import ImageDataGenerator
from keras.preprocessing import image
from keras.layers import Dropout, Flatten, Dense
from keras.applications import ResNet50
from keras.models import Model, Sequential
from keras.layers import Dense, GlobalAveragePooling2D
from keras import backend as K
from keras.applications.resnet50 import preprocess_input

The kernel keeps on restarting with the following message :

The kernel appears to have died. It will restart automatically.

Anyone have a solution to this problem?

Ok I found the answer I just downgraded tf to 1.5 version and it seems to work!

Didn’t fix anything for me.

Hi,

One solution I found to this problem is to create a new environment and reinstall keras and tensorflow-gpu on the paperspace machine. Tell me if it works for you.

I don’t know why but the I couldn’t fix keras even by installing from source.

Hi,

I’m getting the same.
What does it mean create new environment?

Only reinstalling doesn’t seem to work for me.

Neither downgrading tensorflow-gpu to 1.5 nor reinstalling seems to help. Has anyone figured out what exactly causes this problem and what’s a fool proof way of avoiding it?

What worked for me (Python 2.7, tensorflow-gpu):

pip2 uninstall tensorflow-gpu
pip2 install tensorflow-gpu
pip2 uninstall keras
pip2 install keras