Currently i m doing something like this:
You could use the elementwise comparison using
torch.max by passing two tensors:
min(input, other, out=None) -> Tensor
Each element of the tensor
inputis compared with the corresponding element of the tensor
otherand 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.