Multiplication with itself along specific dimension

Hi,

i would like to ask how do i get the result of the elementwise multiplication of a matrix.

Assume we have a tensor matrix with the size of [N, V]. I would like to have the elementwise multiplication along dimension 1. The results should be [V1*V2*V3*...*VN], which will have finally the shape [V].

With best regards
Kevin

Hi Kevin!

Does matrix.prod (dim = 1) do what you want?

Best.

K. Frank