Fastai
This article will take 1 minute to read.
part of my studying of deep learning.
TODO:
- Create simple end-to-end app
Lesson 3 Production and Deployment
DataBlocks go before a dataloaders?
bear = bears.new(item_tfms=Resize(128), batch_tfms=aug_transforms(mult=2))
dls = bears.dataloaders(path)
dls.train.show_batch(max_n=8, nrows=2, unique=True)
So create a datablock, then create a dataloaders with it? Then you can train the loaded data? I geuss.
It’s much easier to clean data after you train your model. This allows you to quickly find least confident elements and remove or move them. FastAI does this with the ImageClassifierCleaner, which takes a learner as an argument.
Deployment
Trained models can be exported to a .pkl
, which is basically all the information of the model.
This .pkl
file can later be imported, and used to predict.
You can serve your Jupyter notebooks online! you can use Voila to build it, and Binder to run it.
Deploy to mobile
Deploy to server, and serve on mobile, it’s easier.
How to deploy:
- Manual Process
- Run model in parallel with normal systems
- Humans check every prediction
- Limited scope deployment
- careful human supervision
- Time and/or geography limited
- Gradual Expansion
- Good reporting systems needed
- Consider what could go wrong
Beware feedback loops -> especially with models whose predictions affect their future inputs.
Notes mentioning this note
There are no notes linking to this note.