For quick testing of the training loop and Callbacks

synth_dbunch[source]

synth_dbunch(a=2, b=3, bs=16, n_train=10, n_valid=2, cuda=False)

class RegModel[source]

RegModel() :: Module

Same as nn.Module, but no need for subclasses to call super().__init__

synth_learner[source]

synth_learner(n_trn=10, n_val=2, cuda=False, lr=0.001, data=None, model=None, loss_func=None, opt_func=Adam, splitter=trainable_params, cbs=None, metrics=None, path=None, model_dir='models', wd=None, wd_bn_bias=False, train_bn=True, moms=(0.95, 0.85, 0.95))

class VerboseCallback[source]

VerboseCallback(after_create=None, before_fit=None, before_epoch=None, before_train=None, before_batch=None, after_pred=None, after_loss=None, before_backward=None, before_step=None, after_cancel_step=None, after_step=None, after_cancel_batch=None, after_batch=None, after_cancel_train=None, after_train=None, before_validate=None, after_cancel_validate=None, after_validate=None, after_cancel_epoch=None, after_epoch=None, after_cancel_fit=None, after_fit=None) :: Callback

Callback that prints the name of each event called

Install Utils

get_env[source]

get_env(name)

Return env var value if it's defined and not an empty string, or return Unknown

try_import[source]

try_import(module)

Try to import module. Returns module's object on success, None on failure

nvidia_smi[source]

nvidia_smi(cmd='nvidia-smi')

res = nvidia_smi()

nvidia_mem[source]

nvidia_mem()

nvidia_mem()
['48600', '7982']

show_install[source]

show_install(show_nvidia_smi:bool=False)

Print user's setup information

- Export