A summary of the first lesson of the fastai v1 course.
fast.ai
fast.ai is an API built on top of pytorch that provides easy implementation of machine learning functions for most practical usecases, without having to worry about any of the boilerplate code. Not just that, it also enables customisations in all the right places.
This is my one of many attempts at completing the fastai course. I have been at it since the first iteration of the course, back in 2016.
In this blogpost we talk about the contents of the first lesson of the course.
In the first lesson Jeremy explains the steps involved in training an image classifier using the datablock
api. datablock
s are building blocks for model development in the fastai
universe and come with several inbuilt methods that expedite model training and exploration.
Steps to train an image classifer using datablock
and resnet18
architecture:
- Create a datablock api
- Pass the path of the data to dataloaders method of the datablock
- Create learner with
resnet18
architecture and the dataloader created in step2 fine_tune
the learner- export learner as pickle for inferencing.
Let’s understand the inputs to the datablock api -
- datatype - input object type, label type
- function to identify the label
- item transformations
- batch transformations
- splitter - function to split to training and validation datasets
- get_items - function to obtain the input objects
There are task specific dataloader
s built on top of datablock
s which further simply data load, eg. Segmentation dataloaders, Tabular dataloader, collab dataloaders, and more.