Skip to content

torch.nn — 练习 ​

Download exercise.py

  1. make_mlp:Sequential(Linear, ReLU, Linear)。
  2. gru_one_step:返回 (GRUCell 实例, h_t),h_t.shape == (batch, hidden_size)。
bash
cd docs/programming/nn/code
python exercise.py

源码位置 ​

docs/programming/nn/code/exercise.py