y=lab.prod(x) returns a tensor y of the product of the elements in each column of x.

y=lab.prod(x,2) performs the prod operation for each row and y=lab.prod(x,n) performs the prod operation over the dimension n.