第8章現代の畳み込みニューラルネットワーク
8.3.3. Training8.3.3 訓練
As before we use Fashion-MNIST to train the model using the same optimizer that we used for AlexNet and VGG.
英語のヒント
前と同じように、Fashion-MNISTを使い、AlexNetとVGGで使ったのと同じオプティマイザでモデルを訓練する。
model = NiN(lr=0.05)
trainer = d2l.Trainer(max_epochs=10, num_gpus=1)
data = d2l.FashionMNIST(batch_size=128, resize=(224, 224))
model.apply_init([next(iter(data.get_dataloader(True)))[0]], d2l.init_cnn)
trainer.fit(model, data)