来源:fastai
浏览 414
扫码
分享
2021-03-31 08:23:09
Questionnaire
- Why do we say that fastai has a “layered” API? What does it mean?
- Why does a
Transform
have a decode
method? What does it do? - Why does a
Transform
have a setup
method? What does it do? - How does a
Transform
work when called on a tuple? - Which methods do you need to implement when writing your own
Transform
? - Write a
Normalize
transform that fully normalizes items (subtract the mean and divide by the standard deviation of the dataset), and that can decode that behavior. Try not to peek! - Write a
Transform
that does the numericalization of tokenized texts (it should set its vocab automatically from the dataset seen and have a decode
method). Look at the source code of fastai if you need help. - What is a
Pipeline
? - What is a
TfmdLists
? - What is a
Datasets
? How is it different from a TfmdLists
? - Why are
TfmdLists
and Datasets
named with an “s”? - How can you build a
DataLoaders
from a TfmdLists
or a Datasets
? - How do you pass
item_tfms
and batch_tfms
when building a DataLoaders
from a TfmdLists
or a Datasets
? - What do you need to do when you want to have your custom items work with methods like
show_batch
or show_results
? - Why can we easily apply fastai data augmentation transforms to the
SiamesePair
we built?
Further Research
- Use the mid-level API to prepare the data in
DataLoaders
on your own datasets. Try this with the Pet dataset and the Adult dataset from Chapter 1. - Look at the Siamese tutorial in the fastai documentation to learn how to customize the behavior of
show_batch
and show_results
for new type of items. Implement it in your own project.