Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete starter code #169

Closed
ceferisbarov opened this issue Jul 29, 2024 · 2 comments · Fixed by #176
Closed

Incomplete starter code #169

ceferisbarov opened this issue Jul 29, 2024 · 2 comments · Fixed by #176

Comments

@ceferisbarov
Copy link

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.

@adrhill
Copy link
Member

adrhill commented Oct 10, 2024

Sorry for the large delay. The ... in the example was due to DataAugmentations.jl having issues with inverted height and width dimensions.
I created https://github.com/adrhill/ImageNetDataset.jl for this purpose but (so far) decided against registering it. My PRs to DataAugmentations have since been merged an released, so I'll try to address this very soon.

@ceferisbarov
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants