Hi,
I want to do maximum along specific axis for example like in numpy:
x = np.random.rand(3,4,5,6)
x.shape
-----------
(3, 4, 5, 6)
Followed by:
y=x.min(axis=(1,2))
y.shape
----------
(3, 6)
That is - the min function reduced the (1,2) axis in the above example.
The min function in torch has the dim
parameter - and it can include only one axis, and when used, it doesn’t return a reduced tensor.
Is there a convenient way to overcome this?
Thanks!
Roee