Solved by Eta_C in post #4 
              
              
                import torch
x = torch.rand(1, 2, 3, 4)
answer, index = torch.min(x, dim=1)

my_result = torch.gather(x, 1, index[:, None, ...]).squeeze(1)
print((my_result == answer).all())  # True