Thanks for the answer. Actually I already solve this problem. Previously I had a misunderstanding of this implementation. I only treat my input vector as a column vector, so I need a left multiply weight matrix. However, I can use a row vector instead so right multiply a matrix then I can still get a new row vector.