Matrix multiplication (dot product style) is well known not to be commutative, so the order matters. Here’s a thread which discusses this as it applies to the cost function.
Matrix multiplication (dot product style) is well known not to be commutative, so the order matters. Here’s a thread which discusses this as it applies to the cost function.