Okay, so I have updated the code and made sure I don’t perform operations on tensors,but rather variables , here is the complete gist code ( exported from jupyter notebook as .py)

  
      gist.github.com
  
  
    https://gist.github.com/saurabhvyas/40bea8449fc92b6053294cdb8bff3394 50
gistfile1.txt

# coding: utf-8

# In[ ]:




# In[1]:

This file has been truncated. show original




  
  
    
    
  
  


Still loss is identical, after 2 epochs
I see , others are also facing similar problem

  
    
    
    LSTM Model not training 
  
  
    Hi, I have a character level lstm model for word classification and it doesn’t seem to be training. The error rate after each epoch is almost the same (sometimes even more that the previous one!). The input tensor size is 16 x 250 x 63 (batch x seq length x alphabet size) 
One hot vector encoding has been used to encode a string into a 2d matrix of size 250 x 63. Left padding is done with 0s 
CrossEntropyLoss was used as the loss function 
The lstm class is defined as follows: 
class CharLSTM(nn…