Core modules of fastai¶
The basic foundations needed in several parts of the library are provided by these modules:
basic_data
¶
This module defines the basic DataBunch
class which is what will be needed to create a Learner
object with a model. It also defines the DeviceDataLoader
, a class that wraps a pytorch DataLoader
to put batches on the right device.
Most of the documentation of the following two modules can be skipped at a first read, unless you specifically want to know what a certain function is doing.
torch_core
¶
This module contains the most basic functions and imports that use pytorch. We follow pytorch naming conventions, mainly:
- torch.nn as nn
- torch.optim as optim
- torch.nn.functional as F
Usage¶
Core modules are designed to be in conjuction with application specific modules and imported automatically in those cases.
To import core functionality only:
from fastai.basics import *