Hey, dear fellows or mentors. I have a question when finishing the quiz on ‘shallow neural network’ lesson. I attached the screenshot here.

{removed by mentor}

Following Prof.Andrew’s convention, I made up weight matrix all by column vector form. So when I use it to multiply X, I need to transpose the weight matrix first. But in the quiz, the correct answer seems not to make the weight matrix as column vectors in the first place.

So is there a universal convention to follow, it is easy to get messed up for my brain.

Hello @ZHU_YU,

First and foremost, there is no universal convention.

In DLS, when it is not about neural network, which is when we are talking about logistic regression in the early weeks, we have, as you said, column weight matrix, and we also have column sample matrix.

However, in DLS, whenever it is about neural network, unless otherwise specified, X's shape is (# features, # samples) and W^{[l]}'s shape is (# neurons in the l-th layer, # neurons in the l-1-th layer).

Cheers,

Raymond

PS: We cannot share quiz content here, and I believe your question can stand without those screenshots, so I am removing them for you.

Thank you very much for the concise and precise clarification. All my doubts cleared.

Best regards!

Hello @rmwkwok

I have a question, so if I have 10 variables or characteristics, and 100 training samples, the matrix X should have 10 rows and 100 columns as I understand it, yes?