class documentation

class SaveStatedictCallback(TrackerCallback): (source)

View In Hierarchy

Callback used with fastai when training the neural-network models for saving the statedict of the model after each epoch, given the model improved over the best model so far.

Method __init__ Creates a SaveStatedictCallback object.
Method after_epoch Function called after each epoch
Class Variable order Internal Callback ordering. See fastai.callback, for details
Instance Variable fname Filename for the saved statedict. Filetype is '.statedict'
Instance Variable path Folder to save the statedict in
Class Variable _only_train_loop Undocumented
def __init__(self, path='', monitor='valid_loss', comp=None, min_delta=0.0, fname='model', reset_on_fit=True): (source)

Creates a SaveStatedictCallback object.

Output path is:

    os.path.join(path, fname + '.statedict')
Parameters
pathFolder to save the statedict in
monitorWhat parameter to monitor
compSee fastai.callback.tracker.TrackerCallback for details
min_deltaSee fastai.callback.tracker.TrackerCallback for details
fnameFilename to use
reset_on_fitSee fastai.callback.tracker.TrackerCallback for details
def after_epoch(self): (source)

Function called after each epoch

Internal Callback ordering. See fastai.callback, for details

Filename for the saved statedict. Filetype is '.statedict'

Folder to save the statedict in

_only_train_loop: bool = (source)

Undocumented