from migrating_ignite import *

from 法泰.vision.all import *


data = 数据加载器s(*get_data_loaders(64, 128)).cuda()


opt_func = partial(SGD, momentum=0.5)
learn = 学习者(data, Net(), loss_func=nn.NLLLoss(), opt_func=opt_func, metrics=准确性)
learn.fit_one_cycle(1, 0.01)


0 0.999266 0.597913 0.856200 00:22

As you can see, migrating from 点燃 allowed us to replace 52 lines of code (in run()) with just 3 lines, and doesn't require you to change any of your existing data pipelines, optimizers, loss functions, models, etc. Once you've made this change, you can then benefit from 法泰's rich set of callbacks, transforms, visualizations, and so forth.