This should work:
class RNN(nn.Module):
    def __init__(self, input_size, hidden_size, output_size, n_layers):
        super(RNN, self).__init__()
        self.input_size = input_size
        self.hidden_size = hidden_size
        self.output_size = output_size
        self.n_layers = n_layers 
        self.encoder = nn.Embedding(input_size, hidden_size)
        self.GRU = nn.GRU(hidden_size, hidden_size, n_layers, batch_first=True) 
        self.decoder = nn.Linear(hidden_size, output_size)
        self.init_hidden(batch_size)
        
        
    def forward(self, input, batch_size):
        input = self.encoder(input)
        output, self.hidden = self.GRU(input, self.hidden)
        output = self.decoder(output.squeeze()) #batch_first
        return output
    
    def init_hidden(self, batch_size):
        self.hidden = Variable(torch.randn(self.n_layers,batch_size, self.hidden_size).cuda())

it seems that GRU adds a fake dimension to the output the output size was (64,1,256), just squeezing it done the trick.
Not that you must init the hidden once, so the call to init_hidden must be in the init function (maybe it was a typo).
Also, after correcting this bug and some other, I could’nt run your code over all the set because of out-of-memory error, but maybe it will be ok on your system