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

Added notes to the zplus rule, referring to the original DTD paper, w… #8

Merged
merged 1 commit into from
Feb 17, 2021
Merged
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
10 changes: 9 additions & 1 deletion zennit/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ def __init__(self, gamma=0.25):


class ZPlus(LinearHook):
'''ZPlus (or alpha=1, beta=0) LRP rule.'''
'''ZPlus (or alpha=1, beta=0) LRP rule.

Notes
-----
Note that the original deep Taylor Decomposition (DTD) specification of the ZPlus Rule
(https://doi.org/10.1016/j.patcog.2016.11.008) only considers positive inputs, as they are used in ReLU Networks.
This implementation is effectively alpha=1, beta=0, where negative inputs are allowed.
'''

def __init__(self):
super().__init__(
input_modifiers=[
Expand Down