プリンキピア

第12章最適化アルゴリズム

12.7.5. Concise Implementation12.7.5 簡潔な実装

Using the Trainer instance of the algorithm adagrad, we can invoke the Adagrad algorithm in Gluon.
英語のヒント
アルゴリズムadagradのTrainerインスタンスを使うと、GluonでAdagradのアルゴリズムを呼び出せる。
trainer = torch.optim.Adagrad
d2l.train_concise_ch11(trainer, {'lr': 0.1}, data_iter)
loss: 0.242, 0.129 sec/epoch