Keras中使用LSTM层时设置的units参数是什么

更新时间:2023-06-15 02:45:36 阅读: 评论:0

Keras中使⽤LSTM层时设置的units参数是什么
海珠湖urrent.LSTM(units, activation='tanh', recurrent_activation='hard_sigmoid', u_bias=True,
kernel_initializer='glorot_uniform', recurrent_initializer='orthogonal', bias_initializer='zeros', unit_forget_bias=True,
kernel_regularizer=None, recurrent_regularizer=None, bias_regularizer=None, activity_regularizer=None,
kernel_constraint=None, recurrent_constraint=None, bias_constraint=None, dropout=0.0, recurrent_dropout=0.0)
怀孕忌口年俗model = Sequential()
model.add(LSTM(32, return_quences=True, stateful=True,batch_input_shape=(batch_size, timesteps, data_dim))) model.add(LSTM(32, return_quences=True, stateful=True))黄山双石
model.add(LSTM(32, stateful=True))
激情飞扬
model.add(Den(num_class, activation='softmax'))
类似上述代码中,加重⿊⾊数字的含义。
旅行游记
下图是加了peephole的lstm,⽤来⽰例,lstm则需要去掉C t-1和C t项。可以看到LSTM⾥⾯有⼏个参数矩阵,Wf、Wi、Wo都是参数矩阵。我的理解,上⾯的数字32就是这个参数矩阵的组数。⽐如初始⼀组参数矩阵,Wf、Wi、Wo,计算⼀个lstm值,然后再给⼀组参数矩阵Wf1、Wi1、Wo1,可以再算⼀个lstm值,共32组。参考的博客⾥第⼀个也是类似的解释。
质量管理制度
清平乐年年雪里

本文发布于:2023-06-15 02:45:36,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/957053.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:参数   矩阵   数字   类似   代码   怀孕   黄山   飞扬
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图