Pytorch - Project each row of a tensor to the column space of another tensor
Currently, I have a tensor A, and a tensor U where U is an orthogonal matrix and is of full rank(so that its columns is a set of basis of U's column space, and all columns, say, u_i, have a norm of 1).

I am trying to compute the projection of each row of A onto the column space of U, using the formula from this post.

Which is, to compute Proj(A). 
Is there any convenient functions or better operations to achieve this?
Thanks. 

If you already have a unit norm in each column of projection matrix, just simply

torch.mm(A,U)


should be sufficient.
