pytorch官方文档链接:https://pytorch.org/docs/stable/generated/torch.nn.RNN.html#torch.nn.RNN
input_size:每个token作为输入时的向量长度
hidden_size:中间的隐层向量长度
num_layers:RNN模型的层数
rnn = nn.RNN(10, 20, 2)
input = torch.randn(3, 10)
h0 = torch.randn(2, 20)
output, hn = rnn(input, h0)
# output.shape应该是(3,20);hn.shape应该是(2,20)