But sort function doesn’t do exactly that I want. 
I want to sort each batch element based on the last highlighted column. Moreover, the sorting should be descending order. And the output should be like this:
tensor([[[0.3400, 0.6520, 0.0520, 0.5200, 0.200],
[0.0900, 0.0100, 0.1000, 0.2000, 0.1200],
[1.0000, 0.5000, 0.3000, 0.0000, 0.1100]],
.
.
.])