attribench.ModelFactory

class attribench.ModelFactory[source]

Bases: object

Basic interface for a callable that returns a model. This is necessary for multi-GPU mode, as each subprocess needs its own copy of the model.

Methods

abstract __call__()[source]

Return a model.

Returns:
nn.Module

The model.

Return type:

Module