zergtant / pytorch-handbook

pytorch handbook是一本开源的书籍,目标是帮助那些希望和使用PyTorch进行深度学习开发和研究的朋友快速入门,其中包含的Pytorch教程全部通过测试保证可以成功运行
20.1k stars 5.39k forks source link

rnn示例代码是否有问题 #96

Open zzpzym opened 4 years ago

zzpzym commented 4 years ago

/pytorch-handbook-master/chapter2/2.5-rnn.ipynb中手动实现rnn的代码,其中循环是不是有些问题?for i in range(seq_len): output,hn= rnn(input[i, :], h_0) print(output.size(),h_0.size()) 应该为output,h_0= rnn(input[i, :], h_0)

zergtant commented 4 years ago

啊,我看下