其他分享
首页 > 其他分享> > torch.RNN使用

torch.RNN使用

作者:互联网

inputs = torch.randn(3, 4, 16)
rnn = torch.nn.RNN(input_size=16, hidden_size=6, num_layers=20)
h0 = torch.randn(20, 4, 6)
outputs, _ = rnn(inputs, h0)
print(outputs)

在这里插入图片描述

标签:inputs,randn,RNN,16,outputs,torch,使用
来源: https://blog.csdn.net/ZYripe/article/details/122787149