Explain text predictions of Keras classifiers#325
Explain text predictions of Keras classifiers#325teabolt wants to merge 159 commits intoTeamHG-Memex:masterfrom
Conversation
…nto keras-gradcam-text
…nto keras-gradcam-text
…nto keras-gradcam-text
Co-Authored-By: Mikhail Korobov <kmike84@gmail.com>
…nto keras-gradcam-text
|
@lopuhin Do you think there is anything major left to do in this PR? (besides making the CI pass) |
|
@teabolt I don't recall anything significant, and from a quick glance it looks like all review feedback is addressed so I think it's almost ready. |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #325 +/- ##
==========================================
+ Coverage 97.32% 97.34% +0.02%
==========================================
Files 49 52 +3
Lines 3142 3320 +178
Branches 585 623 +38
==========================================
+ Hits 3058 3232 +174
- Misses 44 46 +2
- Partials 40 42 +2
🚀 New features to boost your workflow:
|
ec0f51c to
6e960ff
Compare
|
Is this ever going to be merged? I'm super interested in seeing this get added to ELI5 ASAP!!! |
Hey @Hellisotherpeople . Sorry for the late reply. If you are still interested you can try installing the PR branch directly with pip:
To test that it worked run: The output should be Tested this with Python 3.7 and Ubuntu 20.04. |
Based on #315 and #329, we use Grad-CAM to highlight parts of text that contribute to a prediction of a Keras classifier.
For example, we can use a call similar to this:
To roughly highlight positive and negative parts of a text (explaining the score given in sentiment analysis):

This PR also makes refactorings (including changes to the public API) to the code at the linked PR's.
WIP items:
Tutorial.Pass CI and coverage.Tests (manual and automated).Docs.Mypy.