Next, the topk receives the resulting output probabilities and returns the best 2 probabilities with their indices in a sorted order. Just that the returned indices tend to be out of range. Here is the sample snapshot: