How to extract -Top(K-10 )- probabilities and labels from CTC layer , I’m trying to get the final top k-10 -words with the associated  probabilities.
The code is based on https://github.com/meijieru/crnn.pytorch/blob/master/demo.py 38
any hint or help ?
I added this code to extract the top k but I’m getting an error
AssertionError: text with length: 260 does not match declared length: 26
my code
model .eval()
output = model(image)
_, predicted = output.topk(10)
cl = predicted.data[0][0]
print (cl)
predicted = predicted.transpose(1, 0).contiguous().view(-1)
predicted_size = Variable(torch.IntTensor([preds.size(0)]))   sim_predicted = converter.decode(predicted.data, predicted_size.data, raw=True)
Thanks