Mutliple along row/columns for a 2D Tensor

Is there any effective way to multiple the values of a Tensor along a particular dimension? I am doing the operation using for loops.

Thank You

are you looking for multiplying along the particular dimension?
Can you give an example for what are you looking for?

for a 2D tensor
4,5,6] ;

Multiplying along dimension 1 should give [6;120] and multiplying along dimension 0 should be [4, 10, 18]

Found it… it is cumprod.
Thank You