models#

Module attributes and functions#

models.get_all_models()[source]#
Return type:

List[dict]

models.get_model(args, backbone, loss, transform, dataset)[source]#

Return the class of the selected continual model among those that are available. If an error was detected while loading the available datasets, it raises the appropriate error message.

Parameters:
  • args (Namespace) – the arguments which contains the –model attribute

  • backbone (nn.Module) – the backbone of the model

  • loss – the loss function

  • transform – the transform function

  • dataset – the instance of the dataset

Return type:

ContinualModel

Exceptions:

AssertError: if the model is not available Exception: if an error is detected in the model

Returns:

the continual model instance

Return type:

ContinualModel

models.get_model_class(args)[source]#

Return the class of the selected continual model among those that are available. If an error was detected while loading the available datasets, it raises the appropriate error message.

Parameters:

args (Namespace) – the arguments which contains the –model attribute

Return type:

ContinualModel

Exceptions:

AssertError: if the model is not available Exception: if an error is detected in the model

Returns:

the continual model class

Return type:

ContinualModel

models.get_model_names()[source]#

Return the available continual model names and classes.

Returns:

A dictionary containing the names of the available continual models and their classes.

Return type:

Dict[str, ContinualModel]