-
Notifications
You must be signed in to change notification settings - Fork 334
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
Explain text predictions of Keras classifiers #325
base: master
Are you sure you want to change the base?
Conversation
…nto keras-gradcam-text
…nto keras-gradcam-text
…nto keras-gradcam-text
Co-Authored-By: Mikhail Korobov <[email protected]>
…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
@@ 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
|
ec0f51c
to
6e960ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @teabolt I hope I can finish review in a week, looks really solid, left a few minor comments
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.