2

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?

Dakshila Kamalsooriya
  • 1,391
  • 4
  • 17
  • 36

2 Answers2

0

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

Hari Prasad
  • 461
  • 1
  • 3
  • 9
  • I could run the model one without a problem, so I do not think there's a problem with the batch size. Tried, running as a python scrip, but gets an error. The solutions suggested in the git thread also didn't work. – Dakshila Kamalsooriya Jul 10 '22 at 09:27
0

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

Dakshila Kamalsooriya
  • 1,391
  • 4
  • 17
  • 36