keras.layers.LSTM(units, activation='tanh', recurrent_activation='hard_sigmoid', use_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, implementation=1, return_sequences=False, return_state=False, go_backwards=False, stateful=False, unroll=False)- Long Short-Term Memory layer - Hochreiter 1997.
- Arguments:
- units: 正整数,输出空间的维数。Positive integer, dimensionality of the output space.
- return_state:布尔值。是否返回除输出之外的最后一个状态。Boolean. Whether to return the last state in addition to the output. The returned elements of the states list are the hidden state and the cell state, respectively.
[Keras]LSTM()
最新推荐文章于 2025-08-07 08:01:42 发布
本文详细介绍了 Keras 框架中 LSTM (长短期记忆) 层的参数配置及功能特性。LSTM 是一种特殊的循环神经网络层,用于解决序列数据中的长期依赖问题。文章解释了关键参数如 units、return_state 的作用,并提供了 LSTM 层的基本用法。

417

被折叠的 条评论
为什么被折叠?



