Week 4 Assignment 1, Exercise 5

Hi guys, I have all my cells validated up to exercise 5. I am getting this error when trying to append the cache. I restarted the kernel various times but nothing.

Any ideas on how to debug this please??

This is my code

{moderator edit - solution code removed}

Value Error: hapes (1,3) and (4,4) not aligned: 3 (dim 1) != 4 (dim 0)

It’s a little hard to tell for sure from the way you formatted your post, but it looks like your code for the output layer is at the same indentation level as the code for the hidden layers. If so, that is a mistake, since it means the output layer logic is part of the for loop, right? Indentation is part of the syntax in python, so you can’t just format things to look nice. You have to understand the rules.