RNN,LSTM 分手后的思念是犯贱 2023-06-04 02:53 17阅读 0赞 RNN: ![1603578-20190710152944804-733814546.png][] Vanilla Neural Network :对单一固定的输入给出单一固定输出 Recurrent Neural Network:对单一固定的输入给出一系列输出(如:可边长序列),例:图片描述 对可变尺寸输入给出单一固定输出,例:语句的情感分析,对视频(时间长度可变)做决策 对可变尺寸输入给出可变尺寸输出,例:机器翻译,对视频做帧数分类 ![1603578-20190710161115905-1541391214.png][] x作为输入传入RNN,RNN有一个内部隐藏态(internal hidden state),整个隐藏态会在RNN每次读取新的输入时更新,隐藏态会在下次读取输入时将结果反馈至模型。ht代表新的状态,fw代表一种循环函数机制,xt代表输入每个时步的fw和权重都相同。 对可变尺寸输入给出可变尺寸输出: ![1603578-20190710163413671-666955234.png][] 对可变尺寸输入给出单一固定输出 ![1603578-20190710163439883-287887178.png][] 对单一固定的输入给出一系列输出 ![1603578-20190710163451854-2064568322.png][] 多对多:机器翻译: 机器翻译使用序列to序列模型,既一对多和多对一组合,编码器是多对一模型,输入句子,输出向量;解码器是一对多模型,输入向量,输出预测结果 由预测结果的损失函数,同时训练编码器和解码器 ![1603578-20190710163506139-10896537.png][] 语言模型: ![1603578-20190711153107130-10467828.png][] ![1603578-20190711153122323-361543954.png][] ![1603578-20190711153140353-1060020522.png][] 通常采用截取方法计算梯度,避免梯度爆炸 ![1603578-20190711153204305-190014367.png][] ![1603578-20190711161239643-126637117.png][] RNN注意力 ![1603578-20190711161254096-577420685.png][] ![1603578-20190711161335960-350326134.png][] LSTM: ![1603578-20190711161346948-1024263634.png][] ![1603578-20190711161409995-2121384043.png][]![1603578-20190711161423950-92495405.png][] ![1603578-20190711161445079-1792106786.png][] ![1603578-20190711161458787-2134948290.png][] ![1603578-20190711161518847-1251528005.png][] ![1603578-20190711161605287-619392562.png][] ![1603578-20190711161638005-633288792.png][] ![1603578-20190711161717334-1841685563.png][] 1 转载于:https://www.cnblogs.com/Manuel/p/11164849.html [1603578-20190710152944804-733814546.png]: /images/20230601/5119c7231f9944bea2741345a13bf7e0.png [1603578-20190710161115905-1541391214.png]: /images/20230601/d8fffbdcbf9643c1a4bbe35538b69af7.png [1603578-20190710163413671-666955234.png]: /images/20230601/b118de39682c43d88bb63d76244df783.png [1603578-20190710163439883-287887178.png]: /images/20230601/9f5bc998be7e4807b781c81ecd72e168.png [1603578-20190710163451854-2064568322.png]: /images/20230601/ab80187ca8a041e9a1a3ab4baa186ae6.png [1603578-20190710163506139-10896537.png]: /images/20230601/78cd312b3feb460892bdca520d90c38c.png [1603578-20190711153107130-10467828.png]: /images/20230601/b68a6d445ce2463f8813335f9f2f196c.png [1603578-20190711153122323-361543954.png]: /images/20230601/13cb7b7548044a56856571911343bd5e.png [1603578-20190711153140353-1060020522.png]: /images/20230601/6903049cd11249c6bd7185d5058e26d4.png [1603578-20190711153204305-190014367.png]: /images/20230601/3c06f0bdea9c46ffb11ea139fc018a94.png [1603578-20190711161239643-126637117.png]: /images/20230601/5d0d535522f24019af80bc9ed4d94eb4.png [1603578-20190711161254096-577420685.png]: /images/20230601/0e0bcde5a5b3449a88b359e31169a7ca.png [1603578-20190711161335960-350326134.png]: /images/20230601/642215f701f04d109849810c37619cc5.png [1603578-20190711161346948-1024263634.png]: /images/20230601/c10a596609e6461c95cdce55b5fea599.png [1603578-20190711161409995-2121384043.png]: https://img2018.cnblogs.com/blog/1603578/201907/1603578-20190711161409995-2121384043.png [1603578-20190711161423950-92495405.png]: /images/20230601/2c6b02adb848415f95480fc5ac07336e.png [1603578-20190711161445079-1792106786.png]: /images/20230601/e17585f541654eddbc686cc255d624f0.png [1603578-20190711161458787-2134948290.png]: /images/20230601/30ec3b0a4cae4a18b07ee15376811f3e.png [1603578-20190711161518847-1251528005.png]: /images/20230601/a9b81a7181ba42d7b7ec79611d71e843.png [1603578-20190711161605287-619392562.png]: /images/20230601/bc5632fdb5494d20bc256eb3e487c02b.png [1603578-20190711161638005-633288792.png]: /images/20230601/3c8a572c05fa419a9a7ad64cd014d39e.png [1603578-20190711161717334-1841685563.png]: /images/20230601/77c77f7eac854de0a8addae6e1bc1188.png
还没有评论,来说两句吧...