DLS Course 1 week 4 assignment 2 two_layer model

I got the second exercise correctly, but am getting the numeric values wrong on the first one. The datatype_check and shape_check pass, but the equation_values check fails.

The code seems straightforward, and I can’t see anything to change, so I’m missing something obvious I think.

my code is as follows:

{moderator edit - solution code removed}

Any hints?

It is a mistake to use the “deep” version of the initialization routine for the 2 layer case. They give you a different routine for that. It turns out that the two use different algorithms.

Well, it’s ok to use a different “init” routine in general terms, but what I mean is it will generate different results and will fail the grader to use the “deep” init for the 2 layer case.