-
Notifications
You must be signed in to change notification settings - Fork 252
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
Intgrad multiple inputs #321
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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 for the PR Giovanni, mostly minor things to fix.
def _calculate_sum_int(batches: List, | ||
model: Union[tf.keras.Model, 'keras.Model'], | ||
target: List, | ||
target_paths: np.ndarray, | ||
n_steps: int, | ||
nb_samples: int, | ||
step_sizes: List, |
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.
Can we be more explicit about the types? Are these List[tf.Tensor]
or List[List[tf.Tensor]]
?
Codecov Report
@@ Coverage Diff @@
## master #321 +/- ##
==========================================
- Coverage 86.08% 86.07% -0.01%
==========================================
Files 56 56
Lines 7029 7155 +126
==========================================
+ Hits 6051 6159 +108
- Misses 978 996 +18
|
Extends the integrated gradients method to model with multiple inputs. For each input of the model, attributions are calculated and returned in a list. Also extends the method allowing to calculate attributions for multiple internal layers. If a list of layers is passed, a list of attributions is returned.