Skip to content

Batch support for saliency maps #7334

@surajpaib

Description

@surajpaib

Is your feature request related to a problem? Please describe.
Currently, classes to generate saliency maps like VanillaGrad, SmoothGrad, etc. support only running on a single input sample.

Giving a batch of samples results in a ValueError due to this

if x.shape[0] != 1:

Describe the solution you'd like
Batch support for saliency maps can speed up calculation when running over an entire dataset.

Describe alternatives you've considered
I'm currently calculating saliency on a large number of output features over a large number of samples, and this is quite slow despite naive parallelization.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions