Grading Error: A problem compiling the code from your noteboo

When I submit my .ipynb files for grading, it will give me zero marks with the following error:

My code worked well in Colab, and I received the expected output and full marks for history.pkl. I would appreciate your help in resolving this. Thank you.

Hello Chathurika,

can I know what are you recalling activation in your model architecture? I mean with what code?

activation=???

Regards
DP

Hi Deepti,

Thank you for getting back to me.
I am using ‘relu’ and ‘sigmoid’ (in the last Dense layer) in my mode.

[Image removed by Mentor]

Hello Chathurika,

Kindly remove codes from the public post, it is against community guidelines.

You are not suppose to use input_shape in each of the conv2d layer but only for the first layer.

Also in model.compile as the optimizer need to be only rmsprop without learning rate.

P.S. kindly remove the codes!!!

Regards
DP

1 Like

Hi Deepti,

Sorry, this is my first time posting a question. I will make sure not to include code in public posts. And thank you so much for your help.

Hello Chathurika,

No problem, we learn from our mistake.
I understand. Hope that solved your issue.

Happy to help.

Keep Learning!!!

Regards
DP

Hi Deepti,

I fixed the code, but the same error still appears when I submit files. (Code runs error-free and produces the expected output in Colab.)

I would greatly appreciate your assistance with this issue.

Hello Chathurika,

Can you check with the grader cell where you create root directory and split data. I am sharing a link for these two grader cell. See if you have followed as per the instructions mentioned for those two cells.

If still after following these instructions, you have this issue then send me your notebook.

Regards
DP

Hello Chathurika,

After going through your notebook, I am going to repeat again as I had suspected # Define root directory and # GRADED FUNCTION: split_data needs correction. Yo hardcoded the path for both the cells.

this is clearly mentioned in the root directory

Don’t hardcode the paths. Use os.path.join to append the new directories to the root_path parameter.

Please refer these points one by one for correction of both root directory and split data grader cell in the link shared. It is explained in detail. Do not create too many loops in your codes.

Also You batch_size is too small. Remember if your batch_size is too small, it has an effect performance of the model. Try using higher batch_size. See the graph below which compares yours and my assignment’s loss.

Also use optimizer only as ‘rmsprop’
Do these corrections and run your training model.

Let me know once you clear the assignment.

go one by one for cell correction, take break, it helps to do these codes better.

Regards
DP