Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from fastai.vision import *
- import neptune
- from neptunecontrib.monitoring.fastai import NeptuneMonitor
- ctx = neptune.Context()
- mnist = untar_data(URLs.MNIST_TINY)
- tfms = get_transforms(do_flip=False)
- data = (ImageItemList.from_folder(mnist)
- .split_by_folder()
- .label_from_folder()
- .transform(tfms, size=32)
- .databunch()
- .normalize(imagenet_stats))
- neptune_monitor = NeptuneMonitor(ctx=ctx)
- learn = create_cnn(data, models.resnet18, metrics=accuracy, callbacks=[neptune_monitor])
- learn.fit_one_cycle(2, 1e-2)
Add Comment
Please, Sign In to add comment