How many lines of code does it take to train a deep learning model?
Six, if you know which ones.
Check out the secret sauce for training a savvy deep learning model to spot pets in pictures:
from fastai.vision.all import *
path = untar_data(URLs.PETS)
dls = ImageDataLoaders.from_name_re(path, get_image_files(path/'images'), pat='(.+)_\d+.jpg', item_tfms=Resize(460), batch_tfms=aug_transforms(size=224, min_scale=0.75))
learn = vision_learner(dls, models.resnet50, metrics=accuracy)
learn.fine_tune(1)
learn.path = Path('.')
learn.export()
When I mentor AI novices, they often do a double-take at how little code it actually takes to kickstart a formidable deep learning machine. People have these wild notions about deep learning, thinking it’s all about:
- A boatload of complex math
- An ocean of data
- A wallet-draining supercomputer setup
But here’s the reality check:
- Basic high school math will do the trick
- We can make do with just a pinch of data
- And guess what? Most of the heavy lifting can be done on freebie computing resources
Get ready to craft some mind-blowing AI apps in our FastAI coaching program. We’ll arm you with the skills to build top-notch deep learning models. All you need is a minimum of one year’s experience in Python programming. Shoot us a message on WhatsApp now to snag your spot!