Skip to content

Incomplete starter code #169

@ceferisbarov

Description

@ceferisbarov

Can you please update the example code to be runnable? It looks like README has been updated several times to match the API changes and the runnable example that once existed has been lost in the process:

using ExplainableAI

# Load model and input
model = ...                      # load classifier model
input = ...                      # input in batch-dimension-last format

# Run XAI method
analyzer = SmoothGrad(model)
expl = analyze(input, analyzer)  # or: analyzer(input)

# Show heatmap
heatmap(expl)

# Or analyze & show heatmap directly
heatmap(input, analyzer)

I think it was easier when the model and input variables were defined beforehand. I have figured it out now, but it can be a frustrating experience for newcomers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions