第5章多層パーセプトロン
5.2. Implementation of Multilayer Perceptrons5.2 多層パーセプトロンの実装
Multilayer perceptrons (MLPs) are not much more complex to implement than simple linear models. The key conceptual difference is that we now concatenate multiple layers.
英語のヒント
多層パーセプトロン(MLP)の実装は、単純な線形モデルの実装とくらべて、それほど複雑ではない。概念上の大きな違いは、今度は複数の層を連結することである。
import torch
from torch import nn
from d2l import torch as d2l