Hello,
I was using the model below with 1 GRU layer and it was working perfectly but once I increase the number of GRU layers it start giving errors like
RuntimeError: Expected hidden size (2, 10, 100), got (1, 10, 100)
Please advise 
class GRU(nn.Module):
    def __init__(self, input_size, hidden_size, output_size):
        super(GRU, self).__init__()
        num_layers = 2
        self.hidden_size = hidden_size
        self.gru = nn.GRU(input_size, hidden_size,num_layers,dropout=0.1)
        self.linear = nn.Linear(hidden_size, output_size)

    def forward(self, input, hidden):
        hx, hn = self.gru(input, hidden)
        rearranged = hn.view(hn.size()[1], hn.size(2))
        out1 = self.linear(rearranged)
        out2 = F.softmax(out1)
        return out2