The goal for this project from this point on is to shift away from implementing everything from scratch and using things that we've already built from PyTorch to take advantage of the C speed that makes us able to perform our own experiments and iterate quickly

get_imaggenette[source]

get_imaggenette()

class CustomLearner[source]

CustomLearner(model, loss_func, optimizer, db)

get_learner[source]

get_learner()

Helper function to get learner

get_runner[source]

get_runner(callbacks=None)

class ProgressCallback[source]

ProgressCallback() :: Callback

Callback to make a nice progress bar with metrics for training. Slightly modified version of: https://github.com/fastai/course-v3/blob/master/nbs/dl2/09c_add_progress_bar.ipynb

class TrainEvalCallback[source]

TrainEvalCallback() :: Callback

Keeps track of training/eval mode of model and progress through training

accuracy[source]

accuracy(preds, targ, *args)

Compute accuracy of preds with respect to targ

class CudaCallback[source]

CudaCallback() :: Callback

Base class for callbacks, defines order of execution and allows abstraction of self to runner class

class Runner[source]

Runner(learner, cbs=None)

All encompossing class to train a model with specific callbacks

!python notebook2script.py ScratchToPytorch.ipynb
Converted ScratchToPytorch.ipynb to ModernArchitecturesFromPyTorch/nb_ScratchToPytorch.py