第4章分類のための線形ニューラルネットワーク
4.5.3. Training4.5.3 訓練
Next we train our model. We use Fashion-MNIST images, flattened to 784-dimensional feature vectors.
英語のヒント
次にモデルを訓練する。Fashion-MNISTの画像を、784次元の特徴ベクトルに平らにして使う。
data = d2l.FashionMNIST(batch_size=256)
model = SoftmaxRegression(num_outputs=10, lr=0.1)
trainer = d2l.Trainer(max_epochs=10)
trainer.fit(model, data)As before, this algorithm converges to a solution that is reasonably accurate, albeit this time with fewer lines of code than before.
英語のヒント
前と同じく、このアルゴリズムはそれなりに正確な解に収束する。ただし今回は、前より少ない行数のコードで済んでいる。