W1- Advanced Learning Algorithms, incorrect b-vector description in Practice Lab: Neural Networks

The following is noted in the practice lab:

Note: The bias vector b could be represented as a 1-D (n,) or 2-D (n,1) array. Tensorflow utilizes a 1-D representation and this lab will maintain that convention.

I checked this comment in python and found that the accurate 2-D representation of the b-vector should be (1, n), and not (n,1). We are adding a different bias to each neuron by record, and not adding the same bias to each neuron. Please confirm. The 1-D representation works accurately/correctly.

This should be clarified as both explanations do not work the same as written.

Thank you. M


Yes that seems to be a typo with the 2D array it should be (1,n).
Thank you for bringing it to our attention.

To clear confusion for the 1D array let’s check the TensorFlow model directly!

The claims for bias are np arrays of shape (25,), (15,) and (1,):

Checking the model with the code below we see matching results: