image_output_1.png
out_path = Path('./')
out_path.ls()
in_path = Path('../input/')

tfms = get_transforms(do_flip=False, flip_vert=False, max_rotate=20.0, max_zoom=1.1, max_lighting=0.0, max_warp=0.2, p_affine=0.75, p_lighting=0.0)

test = CustomImageList.from_csv_custom(path=in_path, csv_name='test.csv', imgIdx=0)
data = CustomImageList.from_csv_custom(path=in_path, csv_name='train.csv').split_by_rand_pct(0.2).label_from_df(cols='label').add_test(test).transform(tfms).databunch(bs=64, num_workers=0).normalize(imagenet_stats)

learner = cnn_learner(data, models.resnet50, metrics=error_rate, pretrained=False, model_dir='./')

learner.fit_one_cycle(25)

learner.recorder.plot_losses()