Skip to content

GradientShap needs internal_batch_size argument to avoid out-of-memory errors #1350

@princyok

Description

@princyok

🐛 Bug

GradientShap (captum.attr.GradientShap.attribute), which is an extension of Integrated Gradients, needs an internal_batch_size argument just like IntegratedGradients.

Currently, using any large value for n_samples results in out-of-memory errors, because the input is stacked n_samples times. The same kind of issue is already fixed in IntegratedGradients via the internal_batch_size argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions