C2W2_Augmentation_Assignment_Repeated_Kernel_Crash

When creating a post, please add:

  • Week # must be added in the tags option of the post.
  • Link to the classroom item you are referring to:
  • Description (include relevant info but please do not post solution code or your entire notebook):

Hi,

I have completed all the assignments in the CNN course and only stuck with Week 2 Assignment, the Cats Vs Dogs.

The jupyter kernel always keeps crashing at the 4-5 epoch. I have a very small network and augmentation layer.

How to resolve this issue?

What makes you say this is a “crash”? I see no error messages in your image.

1 Like

Hi @TMosh thank you for the response.

I attached the model training screenshot to give an idea about how long the training goes on until the kernel crashes.

In my observation when the kernel crashes, the square bracket corresponding to each cell becomes blank, when the cell is in executing state its ‘*’ and when the cell is executed then a number appears ( example - [1] ) as per the order when the cell was executed.

Please find the attached kernel crash and restart pop up.

Also, I tried to download the data to make it work offline and then upload the data, but the download of the data fails as well. It shows the following error.

Could you please help me with the kernel crash problem ?

a kernel crashes in such cases if it has completely run down the code within the assigned time based on the code written. So in your case, check two places if you callback codes are not missing the limit range which is needed to be mentioned for this assignment as long as I remember. if that is fine, then you need to check your dataset related to training dataset or your model network.

Even if you have small network as per layer, if your input is incorrect defined can also lead to this.

Points where to check in your train_val_dataset, make sure you are using correct parameter for directory, image size, batch, seed and subset.

Next in create augmented model, how are you using input size.

another mistake by most learners is they end up using global variables instead of using local variables or return function previous defined in further grade function downwards.

Hi @Deepti_Prasad

Thank you for the inputs, I could make it work, by reducing the batch size.

In my understanding, I followed all the hints and instructions mentioned in the notebook, all the unit test cases says passed, so my network and associated configurations should not be a problem when the unit test cases says passed ? right ?

Now, a different problem I face is, my network is augmentation_layers + other cnn layers, augmentation layer from the create augmentation function already has input layer in it, and the model trains as well. But after submission I do not get scored for creating the model,

and I get the test case response

““

Failed test case: your model is missing the Input. Expected: a model with a defined Input, but got: Sequential model ‘sequential_1’ has no defined inputs yet..

““

my sequential model = augmentation layers , cnn layers, flatten, dense layers.

I am added in the augmentation layer from the create_augmentation_model function because the comment in the notebook says so,

Could you please provide some insights on this ?

that feedback response means you are incorrectly defining the input layer.

Please click on my name and then message me screenshot of the codes you are failing.

Thank you @Deepti_Prasad for the response, I managed to resolve the issue, and passed the assignment, thank you for your valuable time. I appreciate the help !

1 Like