← Python API
vraven · function

explain_lrp

explain_lrp(model: 'nn.Module', inputs: 'Any', *, target: 'int | Sequence[int] | torch.Tensor | None' = None, epsilon: 'float' = 1e-06, auto_move_inputs: 'bool' = True) -> 'LRPResult'

Run epsilon-rule LRP over Linear, ReLU and Embedding modules.

Unsupported module types between supported layers are skipped for storage but
do not receive a redistribution rule. Models composed only of unsupported
ops raise ``CapabilityError``.

Usage

from vraven import explain_lrp

result = explain_lrp(... )
Source of truthThis page is generated from the checked-out public symbol, signature, and docstring. Pin the package version for reproducible work.