The nn.GRU module expects the inputs as [seq_len, batch_size, features] as described in the docs by default, while other layers, such as nn.Linear, expect dim0 to be the batch dimension.
You could either permute the output of the GRU before passing it to self.fc1 or use batch_first=True while creating the nn.GRU module and pass the input as [batch_size, seq_len, features].