C2_W1_Assignment

Hello fellows, My problem with this assignment is with Exercise 2.

There is a mismatch with the w and a_in shape to np.dot them. There´s no way I can make it work and I am stuck.

My code is:

def my_dense(a_in, W, b):

“”"

Computes dense layer

Args:

a_in (ndarray (n, )) : Data, 1 example

W (ndarray (n,j)) : Weight matrix, n features per unit, j units

b (ndarray (j, )) : bias vector, j units

Returns

a_out (ndarray (j,)) : j units|

“”"

*{mentor edit: code removed*

The problem is with the line z = np.dot…

w is not getting any column from W and the dot product cannot be computed.

I really appreciate your help on this…