How to map the hidden_size dimension to output dimension of different size in RNN?

In RNN, how can I make the output dimensions (# of features) be different than the hidden_size? E.g. I have hidden_size = 32, but I need the dimension of the output to be dim = 4.
Should I add an additional layer that maps from hidden to required output dimension of different size? If so, how can I achieve this in PyTorch?

Just add a linear layer after like so:


self.linear_out = nn.Linear(32, 4)

ahh, it turned out to be quite simple! Thank you, it worked!