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 6, 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 passing hidden_intitial_state like below example in the documentation:
rnn = nn.GRU(10, 20, 2)
input = torch.randn(5, 3, 10)
h0 = torch.randn(2, 3, 20)
output, hn = rnn(input, h0)

In the end, I tested a simple model and for sure you have to pass float numbers to GRU.
Please let me know the result.