Home > Software engineering >  Kernel dies when trying to fit the CNN Model
Kernel dies when trying to fit the CNN Model

Time:07-10

I am trying the build a CNN model for face recognition using Anaconda Jupyter Notebook. The following versions are used:

python==3.7.13
tensorflow==2.6.0
keras==2.6.0
numpy==1.21.5

The following code was run to fit the CNN model.

classifier.fit(training_set, steps_per_epoch=30, epochs=10, validation_data=test_set, validation_steps=10)

But the kernel dies giving the message 'The kernel appears to have died. It will restart automatically'. Reinstalling numpy & mlk worked once, but not works anymore.

How could I fix this?

CodePudding user response:

one of the reason for this issue is your notebook needs more computer power than what actually you have.

try to reduce your batch size

or

try to run everything as python script which will help you in some cases

refer: https://stackoverflow.com/a/71768468/14661869

if not try these methods: https://github.com/jupyter/notebook/issues/1892

CodePudding user response:

Creating a new Python 3.7.13 environment in Anaconda and installing the packages Tensorflow, Keras, Pillow worked!

  • Related