C1_W3_Assignment - bugs and fixes

Hi everyone,

Just wanted to bring up an error I encountered in the programming assignment for W3. In the nn_model function, the print statement for the iteration number and the cost is throwing an error. The error doesn’t effect the tests, it’s just looking ugly :slight_smile:

Also, I think many people have encountered the same problem regarding the matrix multiplication in the forward_propagation function. You should be using the dot product when calculating W@X + b . The instructions seem somewhat misleading - Compute Z by multiplying arrays w and X , and then adding the vector b ."

There are two types of matrix multiplication. Understanding Prof Ng’s notational conventions and also understanding the underlying math is essential in disambiguating which was intended. Here’s a thread which goes into those issues in some detail.

Hi paulinpaloalto,

It wasn’t understanding of the different matrix multiplications that caused the confusion, at least not in my case. This particular assignment started with a single perceptron. Following the instructions it wasn’t clear that the dot product should be used. It could be assumed that the implemented functions don’t have to be generalised but only to work for a single perceptron version in which case it’s actually a vector and a scalar multiplication.

Just my two cents though. It’s not a critique but an observation.