当前位置:网站首页>Pytorch's LSTM parameters explained
Pytorch's LSTM parameters explained
2022-08-02 09:33:00 【A little cute c】
LSTM has a total of 7 parameters:
1: input_size - the size of the input data
2: hidden_size – the size of the hidden layer (ie the number of hidden layer nodes), the dimension of the output vector is equal to the number of hidden nodes
3: num_layers – the number of layers of LSTM stack, the default value is 1 layer, if set to 2, the second LSTM receives the calculation result of the first LSTM.That is, the first layer inputs [ X0 X1 X2 ... Xt ], calculates [ h0 h1 h2 ... ht ], and the second layer takes [ h0 h1 h2 ... ht ] as [ X0 X1 X2 ... Xt ]] The input is calculated again, outputting the final [ h0 h1 h2 ... ht ].
4: bias – whether the hidden layer state has bias, the default is true.bias is the bias value, or offset value
5: batch_first – whether the first dimension of input and output is batch_size, the default value is False
6: dropout – default value 0.Whether to add dropout layers after other RNN layers except the last RNN layer.The input value is a decimal between 0-1 and represents a probability.0 means 0 probability dropout, i.e. no dropout
7: bidirectional – whether it is a bidirectional RNN, the default is: false, if it is true, then: num_directions=2, otherwise it is 1.
边栏推荐
猜你喜欢
自定义卡包效果实现
天地图给多边形加标注
spark:热门品类中每个品类活跃的SessionID统计TOP10(案例)
SVN下载上传文件
Have you ever learned about these architecture designs and architecture knowledge systems?(Architecture book recommendation)
Bigder:41/100生产bug有哪些分类
Jetpack Compose 中的状态管理
一文带你了解推荐系统常用模型及框架
Re23:读论文 How Does NLP Benefit Legal System: A Summary of Legal Artificial Intelligence
腾讯T8架构师,教你学中小研发团队架构实践PDF,高级架构师捷径
随机推荐
system_error错误处理库学习
tf.where使用
PyQt5安装配置(PyCharm) 亲测可用
堪称神级的阿里巴巴“高并发”教程《基础+实战+源码+面试+架构》
裁员趋势下的大厂面试:“字节跳动”
李航《统计学习方法》笔记之感知机perceptron
干货|如何在海量文件系统中选择合适自己的文件系统
Facebook自动化数据分析方案,广告投放省心省力
The god-level Alibaba "high concurrency" tutorial "basic + actual combat + source code + interview + architecture"
动态规划每日一练(2)
[Must read] Mylander valuation analysis, electrical stimulation products for pelvic and postpartum rehabilitation
SAP 云平台上一种 Low Code Development(低代码开发)解决方案
测试时大量TIME_WAIT
日元疲软令游戏机在日本变身“理财产品”:黄牛大赚
刷题错题录1-隐式转换与精度丢失
XML简介
三国演义小说
让电商运营10倍提效的自动化工具,你get了吗?
leetcode:639. 解码方法 II
二维数组零碎知识梳理