Axiovora-X / captum /attr.py
ZAIDX11's picture
Add files using upload-large-folder tool
2a81ac9 verified
"""
Shim for `captum.attr` exposing `IntegratedGradients` to match the real API used in the repo.
"""
from typing import Any, Tuple
class IntegratedGradients:
def __init__(self, model: Any):
self.model = model
def attribute(self, inputs: Any, target: int = 0, return_convergence_delta: bool = False) -> Tuple[Any, Any]:
import numpy as np
attr = np.zeros_like(inputs)
delta = 0.0
return attr, delta
__all__ = ["IntegratedGradients"]