gpt4 book ai didi

python - 递归神经网络 (RNN) - 忘记层和 TensorFlow

转载 作者:太空狗 更新时间:2023-10-29 21:06:37 25 4
gpt4 key购买 nike

我是 RNN 的新手,我正在尝试弄清楚 LSTM 单元的细节以及它们与 TensorFlow 的关系:Colah GitHub enter image description here与 TensorFlow 相比,GitHub 网站的示例是否使用相同的 LSTM 单元?我在 TensorFlow 网站上得到的唯一信息是基本 LSTM 单元使用以下架构:Paper如果它是相同的架构,那么我可以手动计算 LSTM 单元的数字并查看它是否匹配。

此外,当我们在 tensorflow 中设置一个基本的 LSTM 单元时,它会根据以下参数接收 num_units:TensorFlow documentation

tf.nn.rnn_cell.GRUCell.__init__(num_units, input_size=None, activation=tanh)

这是隐藏状态 (h_t)) 和单元状态 (C_t) 的数量吗?

根据 GitHub 网站,没有提及单元状态和隐藏状态的数量。我假设它们必须是相同的数字?

最佳答案

实现看起来与 GRUCell 类相同 doc还用 link 指向同一篇论文(专门用于门控)在 Colah 的文章中给出。参数num_units是单元格的数量(假设是隐藏层)对应于output_size due property definition .

关于python - 递归神经网络 (RNN) - 忘记层和 TensorFlow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44155995/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com