avalanche.training.ClosestToCenterSelectionStrategy

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

A greedy algorithm that selects the remaining exemplar that is the closest to the center of all elements (in 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.