I don’t know what kind of input shape you are using, but assume you are passing in a 3-dimensional tensor?
If that’s the case, I would recommend to check all shapes in both models and make sure the layers work as intended.
E.g. nn.RNN expects an input in the shape [seq_len, batch_size, features] by default, while nn.Linear accepts [batch_size, *, in_features].
The hidden output of nn.RNN would have the shape [num_layers*num_directions, batch_size, hidden_size]. Note that without a permute operation the self.fc layer will use dim0 as the batch dimension.