templates package

Submodules

templates.river module

class templates.river.RiverTemplate(deep_model, online_model, criterion, input_size, output_layer_name=None, train_epochs: int = 1, train_mb_size: int = 1, eval_mb_size: int = 1, device='cpu', plugins: ~typing.Sequence[~avalanche.core.SupervisedPlugin] | None = None, evaluator=<avalanche.training.plugins.evaluation.EvaluationPlugin object>, eval_every=-1)[source]

Bases: SupervisedTemplate

eval_epoch(**kwargs)[source]

Evaluation loop over the current self.dataloader.

forward()[source]

Compute the model’s output given the current mini-batch.

make_optimizer()[source]

Empty function. River online models do not need a Pytorch optimizer.

tensor_to_dict(tensor)[source]
training_epoch(**kwargs)[source]

Training epoch. :param kwargs: :return: