W4_A2_Ex-5.1_expected output differs while Training the model

I’m getting a different expected output. Tests still pass, but not sure why the values aren’t expected. Lmk if I should ignore, thank you.

That doesn’t look right.

Let me check it against my solution, I’ll be back later (maybe tomorrow -It’s now Monday evening in my time zone) with a report.

1 Like

That result probably means you ran the L layer training with the 2 layer network. Please make sure you first run the cell that sets layers_dims to the 4 layer values.

One way to check is to print layers_dims in your code, so that you see what is happening.

1 Like

saweet, yeah that did it! thank you! pardon the mixup, still new to jupyter, more familiar with vscode.

Great! Yes, the evidence was that your code was correct, since the tests pass. But if you run with different inputs, you get a different result. :laughing:

It’s easy to forget to run that separate cell that set layers_dims and pick up the value from the earlier training. Maybe we should suggest to them that they move that logic into the various cells that actually invoke one of the “model” functions, rather than making it a standalone cell. It’s a single line of code and cheap to execute, so why not?