avalanche.training.HerdingSelectionStrategy

class avalanche.training.HerdingSelectionStrategy(model: torch.nn.modules.module.Module, layer_name: str)[source]

The herding strategy as described in iCaRL.

It is a greedy algorithm, that select the remaining exemplar that get the center of already selected exemplars as close as possible as the center of all elements (in the feature space).

__init__(model: torch.nn.modules.module.Module, layer_name: str)

Methods

__init__(model, layer_name)

make_sorted_indices(strategy, data)

Should return the sorted list of indices to keep as exemplars.

make_sorted_indices_from_features(features)

Should return the sorted list of indices to keep as exemplars.