I’ve been working on Course 2 Week 1 exam, I have successfully done the first two graded cells but I am stuck on 3. Since the math and code are somewhat complicated and I am not yet officially trained in Python, I actually lose track of the analytical calculation and how it is performed, hence stuck on the calculation of A_out. Assuming the process is correct…

After multiple attempts, below is one of the errors I get:

Hi @Menelaos_Gkikas
In you code after you select the first column to multiply it with a_in, when you used the matmul function you send all weights not the first column to calculate dense result, so use w in the matrix multiplication

this image show you that you used capital letter W(carry all weights) in the matrix multiplication instead of using small letter w(carry only the first column)

@Menelaos_Gkikas
You can use np.matmul(A_in,W) + b that would calculate the matrix multiplication between A_in & W, and in this case you didn’t want to use loop as it would be complicated

It is far easier to write the code using matrix math functions and avoid the for-loops entirely. Then you don’t have to worry about for-loop and array indices.

It appears that your code is attempting a confusing combination of both for-loops and matrix algebra.

Send me your code for that function in a private message, I’ll review it.
A screen capture image is best, that way I can see what indentation you’re using.

After complete this assignment, If you want to know the matrix muliplication by using dot product of each column(vectors) with loop send me and I will send it to you.