Sir i also tried to print predictions of classes in  sorted order and except first one which i gave everytime prediciton is same for nn.linear.Everytime the sorted prediction is same and there are not changing.
predicted character:c

 predicted_classes in sorted order:
[63 76  2 18 59 51 57 13  3 41 10 68 28 82 19 23 46  0 70 54 80 47 11 69
 31 67 32 12 30 35 43 33 39  6 60  7 38 56  5 65 61 42 29 62 22 14  4 21
 44 17 81 36 55 77 53 78 27 74 75 45 16 71 26 48 37 72 49 40 73 25 64 20
 79 34 52 66 58  8 24 15 50  1  9]

output: tensor([[76]], device='cuda:0') #i choose second highest vale but the predicted sorted order is always same

[63 76  2 18 51 57 13 59  3 41 10 68 28 82  0 23 80 19 54 46 31 70 30 67
 39 69 11 12 47 33 35 32 38 61 43  6 56 65 60 42 29  7  5 21 22 16 44 81
 62 14  4 73 40 36 49 17 48 25 78 72 77 71 79 66 75  8 45 15 58 55 26 74
 53 20  1 64  9 50 37 34 27 24 52]

tensor([[76]], device='cuda:0')

[63 76  2 18 51 57 13 59  3 41 10 68 28 82  0 23 80 19 54 46 31 70 30 67
 39 69 11 12 47 33 35 32 38 61 43  6 56 65 60 42 29  7  5 21 22 16 44 81
 62 14  4 73 40 36 49 17 48 25 78 72 77 71 79 66 75  8 45 15 58 55 26 74
 53 20  1 64  9 50 37 34 27 24 52]
tensor([[76]], device='cuda:0')

code for the printing prediction
def print_re(text,hiddens):
  
  print(text,end=' ')
  model.eval()
  with torch.no_grad():
        # Forwards pass
        tokens=torch.LongTensor([[char2int[text]]]).to(device)
        for i in range(0,10):
         
          embeddings=model.embedding(tokens)
          #print(embeddings.shape)
          hidden_output,(h,c)=model.lstm(embeddings,hiddens)
          #print(hidden_output.shape)
          hidden_output=model.linear(hidden_output)
          #print(hidden_output.shape)
          
          #hidden_output = torch.sigmoid(hidden_output)
          
          hidden_output=hidden_output[0].squeeze(0).squeeze(0)
          
        
          prediction = hidden_output.cpu().numpy()
          #print(prediction)
          prediction = np.argsort(-prediction, axis=0)
          print(prediction)
          print(int2char[prediction[1]],end='')
          
          tokens=torch.LongTensor([[prediction[1]]]).to(device)
          print(tokens)