Oh I see. The output size for RNN is [seq_len, batch, hidden_size * num_directions], i.e., it is directly outputting the hidden stats at each time step. So yes, a linear layer nn.Linear(hidden_size, 1) should work.
Doc is here for your reference: http://pytorch.org/docs/master/nn.html#torch.nn.RNN 18