torch_concepts.nn.BaseModuleInterventionStrategy

class BaseModuleInterventionStrategy(*args, **kwargs)[source]

Abstract base class for intervention strategies.

Intervention strategies define how to intervene on layers (either on the parametrization or on the output).

__init__(*args, **kwargs)[source]

Initialize the intervention module.

Methods

__init__(*args, **kwargs)

Initialize the intervention module.

transform(module, *args, **kwargs)

Forward method to be implemented by subclasses.