torch::prod(ArrayRef)

Hi,

not sure if this is the right place to ask for feature requests. What would be nice to have is a member function of the ArrayRef class that returns to total size

torch::prod(ArrayRef)

This does not work since prod is not implemented for objects of type ArrayRef.

Best regards,
Matthias

Hi, could you create this feature request on GitHub, please?

My apologize. After having created the feature request I was told that this functionality is already available

torch::Tensor a(4,3,2);
a.numel();

I wanted to emulate that by

torch::prod(a.sizes());

but that is apparently not needed anymore. Thank you!