Neural Network Layer Output Calculation: Why is it xA instead of Ax?

83 Views Asked by At

"In a neural network, if the first layer has 'm' neurons and the second layer has 'n' neurons, the layer weight is defined as an m*n matrix. My question is, if 'x' is the input to the first layer, to calculate the output of the second layer (without considering the activation function), we should compute xA, not Ax. This seems a bit odd to me, as in the multiplication between a matrix and a vector, the matrix usually comes first. Could anyone explain why this is the case?"