Fastest way to get the minim,element wise,between two tensors

Currently i m doing something like this:

You could use the elementwise comparison using torch.min and torch.max by passing two tensors:

min(input, other, out=None) → Tensor
Each element of the tensor input is compared with the corresponding element of the tensor
other and an element-wise minimum is taken.
The resulting tensor is returned.

a = torch.randn(10, 2)
b = torch.randn(10, 2)
torch.min(a, b)

Thank you for the response,but it doesen t seem to work like that using libtorch.