avalanche.evaluation.metrics.WeightCheckpoint

class avalanche.evaluation.metrics.WeightCheckpoint[source]

The WeightCheckpoint Metric.

Instances of this metric keeps the weight checkpoint tensor of the model at each experience.

Each time result is called, this metric emits the latest experience’s weight checkpoint tensor since the last reset.

The reset method will bring the metric to its initial state. By default this metric in its initial state will return None.

__init__()[source]

Creates an instance of the WeightCheckpoint Metric.

By default this metric in its initial state will return None. The metric can be updated by using the update method while the current experience’s weight checkpoint tensor can be retrieved using the result method.

Methods

__init__()

Creates an instance of the WeightCheckpoint Metric.

after_backward(strategy)

after_eval(strategy)

after_eval_dataset_adaptation(strategy)

after_eval_exp(strategy)

after_eval_forward(strategy)

after_eval_iteration(strategy)

after_forward(strategy)

after_train_dataset_adaptation(strategy)

after_training(strategy)

after_training_epoch(strategy)

after_training_exp(strategy)

after_training_iteration(strategy)

after_update(strategy)

before_backward(strategy)

before_eval(strategy)

before_eval_dataset_adaptation(strategy)

before_eval_exp(strategy)

before_eval_forward(strategy)

before_eval_iteration(strategy)

before_forward(strategy)

before_train_dataset_adaptation(strategy)

before_training(strategy)

before_training_epoch(strategy)

before_training_exp(strategy)

before_training_iteration(strategy)

before_update(strategy)

reset()

Resets the metric.

result()

Retrieves the weight checkpoint at the current experience.

update(weights)

Update the weight checkpoint at the current experience.