The hidden state of nn.GRU is not a tuple like for nn.LSTM, so hidden[0] is probably not what you want but simply hidden.
Also the shape of hidden is (num_layers * num_directions, batch, hidden_size). I assume your cat() line is there to concatenate the forward in backward direction of the hidden state. If so, you probably want to do the following
# Split num_layers and num_directions (see official docs)
hidden = hidden.view(num_layers, num_directions, batch, hidden_size).
# Consider only the last hidden state (last w.r.t. to num_layer)
hidden = hidden[-1]
# Concatenate forward and backward direction
hidden = torch.cat((hidden[-2,:], hidden[-1,:]), dim=1)

The shape of hidden should now be (batch, 2*hidden_size); otherwise try dim=0, I always get confused how to set this value correctly.