How to?

9.3.deep-rnn

Aug 19, 2024
notesjulyfun技术学习d2l
1 Minutes
57 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

default

符合直觉地,每一个隐状态依赖于 (前一时刻同一层 + 同一时刻前一层) 这两个隐状态。

高级 api 接口

仅需给出第三个参数 num_layers.

1
lstm_layer = nn.LSTM(num_inputs, num_hiddens, num_layers)
2
model = d2l.RNNModel(lstm_layer, len(vocab))
Article title:9.3.deep-rnn
Article author:Julyfun
Release time:Aug 19, 2024
Copyright 2026
Sitemap