Solved by Nikronic in post #5 
              
              
                If I understand properly, the error is when you call self.gru. 
Based on the documentation https://pytorch.org/docs/stable/nn.html#torch.nn.GRU, you have to pass float numbers to GRU object, so you have to remove .long() before passing outputs to self.gru. 
By the way, can you test your model by pas…