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

Quick Fix #139

Merged
merged 5 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
·
<a href="https://deel-ai.github.io/xplique/latest/api/feature_viz/feature_viz/">Feature Visualization</a>
·
<a href="https://deel-ai.github.io/xplique/latest/api/metrics/api_metrics/">Metrics</a>
<a href="https://deel-ai.github.io/xplique/latest/api/attributions/metrics/api_metrics/">Metrics</a>
</p>

The library is composed of several modules, the _Attributions Methods_ module implements various methods (e.g Saliency, Grad-CAM, Integrated-Gradients...), with explanations, examples and links to official papers.
Expand Down Expand Up @@ -222,7 +222,7 @@ metric = Deletion(wrapped_model, inputs, targets)
score_saliency = metric(explanations)
```

Want to know more ? Check the [PyTorch documentation](https://deel-ai.github.io/xplique/latest/api/attributions/PyTorch/)
Want to know more ? Check the [PyTorch documentation](https://deel-ai.github.io/xplique/latest/api/attributions/pytorch/)

</details>

Expand All @@ -243,7 +243,7 @@ There are 4 modules in Xplique, [Attribution methods](https://deel-ai.github.io/
| Guided Backprop | TF | [Paper](https://arxiv.org/abs/1412.6806) | C✔️ R✔️ | C✔️ OD❌ SS❌ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/19eB3uwAtCKZgkoWtMzrF0LTJ-htF_KE7) |
| Integrated Gradients | TF, PyTorch** | [Paper](https://arxiv.org/abs/1703.01365) | C✔️ R✔️ | C✔️ OD✔️ SS✔️ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1UXJYVebDVIrkTOaOl-Zk6pHG3LWkPcLo) |
| Kernel SHAP | TF, PyTorch**, Callable* | [Paper](https://arxiv.org/abs/1705.07874) | C✔️ R✔️ | C✔️ OD✔️ SS✔️ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1frholXRE4XQQ3W5yZuPQ2-xqc-LTczfT) |
| Lime | TF, PyTorch**, Callable* | [Paper](https://arxiv.org/abs/1602.04938) | C✔️ R✔️ | C✔️ OD✔️ SS✔️ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1frholXRE4XQQ3W5yZuPQ2-xqc-LTczfT) |
| Lime | TF, PyTorch**, Callable* | [Paper](https://arxiv.org/abs/1602.04938) | C✔️ R✔️ | C✔️ OD✔️ SS🔵 | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1frholXRE4XQQ3W5yZuPQ2-xqc-LTczfT) |
| Occlusion | TF, PyTorch**, Callable* | [Paper](https://arxiv.org/abs/1311.2901) | C✔️ R✔️ | C✔️ OD✔️ SS✔️ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/15xmmlxQkNqNuXgHO51eKogXvLgs-sG4q) |
| Rise | TF, PyTorch**, Callable* | [Paper](https://arxiv.org/abs/1806.07421) | 🔵 | C✔️ OD✔️ SS✔️ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1icu2b1JGfpTRa-ic8tBSXnqqfuCGW2mO) |
| Saliency | TF, PyTorch** | [Paper](https://arxiv.org/abs/1312.6034) | C✔️ R✔️ | C✔️ OD✔️ SS✔️ | 🔵 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/19eB3uwAtCKZgkoWtMzrF0LTJ-htF_KE7) |
Expand Down
7 changes: 5 additions & 2 deletions TUTORIALS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Here is the lists of the available tutorial for now:

**WIP**

## Features Visualizations
## Feature Visualization

**WIP**
| **Tutorial Name** | Notebook |
| :------------------------------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------: |
| Feature Visualization: Getting started | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1st43K9AH-UL4eZM1S4QdyrOi7Epa5K8v) |
| Modern Feature Visualization: MaCo | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1l0kag1o-qMY4NCbWuAwnuzkzd9sf92ic) |
4 changes: 4 additions & 0 deletions docs/api/feature_viz/feature_viz.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Feature Visualization

<sub>
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d0/Google_Colaboratory_SVG_Logo.svg" width="20">
</sub> [View colab tutorial](https://colab.research.google.com/drive/1st43K9AH-UL4eZM1S4QdyrOi7Epa5K8v)

One of the specificities of neural networks is their differentiability. This characteristic allows us to compute gradients, either the gradient of a loss with respect to the parameters, or in the case we are interested in here, of a part of the network with respect to the input.
This gradient then allows us to iteratively modify the input in order to maximize an objective such as a neuron, a channel or a combination of objectives.

Expand Down
8 changes: 8 additions & 0 deletions docs/api/feature_viz/maco.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Modern Feature Visualization (MaCo)

<sub>
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d0/Google_Colaboratory_SVG_Logo.svg" width="20">
</sub> [View colab tutorial](https://colab.research.google.com/drive/1l0kag1o-qMY4NCbWuAwnuzkzd9sf92ic) |
<sub>
<img src="https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg" width="20">
</sub> [View source](https://github.com/deel-ai/xplique/blob/master/xplique/features_visualizations/maco.py) |
📰 [Paper](https://arxiv.org/pdf/2306.06805.pdf)

Feature visualization has become increasingly popular, especially after the groundbreaking work by Olah et al. [^1], which established it as a vital tool for enhancing explainability. Despite its significance, the widespread adoption of feature visualization has been hindered by the reliance on various tricks to create interpretable images, making it challenging to scale the method effectively for deeper neural networks.

Addressing these limitations, a recent method called MaCo [^2] offers a straightforward solution. The core concept involves generating images by optimizing the phase spectrum while keeping the magnitude of the Fourier spectrum constant. This ensures that the generated images reside in the space of natural images in the Fourier domain, providing a more stable and interpretable approach.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
·
<a href="api/feature_viz/feature_viz/">Feature Visualization</a>
·
<a href="api/metrics/api_metrics/">Metrics</a>
<a href="api/attributions/metrics/api_metrics/">Metrics</a>
</div>

The library is composed of several modules, the _Attributions Methods_ module implements various methods (e.g Saliency, Grad-CAM, Integrated-Gradients...), with explanations, examples and links to official papers.
Expand Down
7 changes: 5 additions & 2 deletions docs/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Here is the lists of the availables tutorial for now:

**WIP**

## Features Visualizations
## Feature Visualization

**WIP**
| **Tutorial Name** | Notebook |
| :------------------------------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------: |
| Feature Visualization: Getting started | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1st43K9AH-UL4eZM1S4QdyrOi7Epa5K8v) |
| Modern Feature Visualization: MaCo | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1l0kag1o-qMY4NCbWuAwnuzkzd9sf92ic) |
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
current_version = 1.2.0
current_version = 1.2.1
commit = True
tag = True
tag = False

[bumpversion:file:setup.py]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="Xplique",
version="1.2.0",
version="1.2.1",
description="Explanations toolbox for Tensorflow 2",
long_description=README,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion xplique/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
techniques
"""

__version__ = '1.2.0'
__version__ = '1.2.1'

from . import attributions
from . import concepts
Expand Down
Loading