The kernel appears to have died. It will restart automatically


Everytime i am running the assignment on my local system with anaconda I do get the following error while fitting the model. any help would be appreciated.


Hello @Neeraj_Katiyar
Welcome to our Community! Thanks for reaching out. We are here to help you.

Considering that the kernel dies in the training process, it can be that you don’t have enough local resources to perform the training (Usually, it’s a lack of RAM).
I recommend you reduce the batch size, try changing it to a 2 or 4, and rerun the code.
The batch size is a number of samples processed before the model is updated, if you reduce it, it will be slower, but the computational cost will be less.

train_generator = train_datagen.flow_from_directory(directory=TRAINING_DIR, 
                                  target_size=(150, 150))

Do you have the same problem when you run it in the course? Or in google collab?

Hopefully, help :hugs:

1 Like