Week_4_Exercise - L_Model_forward_error

Hi there,

I’m stuck on passing the test cases for exercise 5. Any feedback would be appreciated, thanks!

This is how I implemented it, I tried a few different ways and I’m not sure what I’m doing wrong here.

{moderator edit - solution code removed}

The problem is that indentation is part of the syntax of python. The way you wrote the logic, you are calling linear_activation_forward twice in each iteration of the loop.

BTW the rules are that we aren’t supposed to publicly share source code, so we’re not supposed to just post our code and say, in effect, “please fix it for me”.

Okay, thank you for the feedback! I will try adjusting that.

Also, sorry about posting the source code, I will keep that rule in mind for future posts.