from fastai.gen_doc.nbdoc import * from fastai.vision import * show_doc(cnn_learner) path = untar_data(URLs.MNIST_SAMPLE) data = ImageDataBunch.from_folder(path) learner = cnn_learner(data, models.resnet18, metrics=[accuracy]) learner.fit_one_cycle(1,1e-3) learner.save('one_epoch') show_doc(unet_learner) jekyll_warn("The models created with this function won't work with pytorch `nn.DataParallel`, you have to use distributed training instead!") show_doc(Learner.predict) img = learner.data.train_ds[0][0] learner.predict(img) learner.export() learn = load_learner(path) show_doc(create_body) show_doc(create_head, doc_string=False) show_doc(ClassificationInterpretation, title_level=3) learn = cnn_learner(data, models.resnet18) learn.fit(1) preds,y,losses = learn.get_preds(with_loss=True) interp = ClassificationInterpretation(learn, preds, y, losses) show_doc(ClassificationInterpretation.from_learner, full_name='from_learner') show_doc(Learner.interpret, full_name='interpret') show_doc(ClassificationInterpretation.plot_top_losses, full_name='plot_top_losses') interp.plot_top_losses(9, figsize=(7,7)) show_doc(ClassificationInterpretation.plot_multi_top_losses, full_name='plot_multi_top_losses')