You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an analyzer that uses model checks (e.g., LRPSequentialPresetA), a NotImplementedError is raised for every check that should only be a warning. This originates from the snippet (lines 120-125 in analyzer/base.py):
ifcheck_type=="exception":
raiseNotAnalyzeableModelException(tmp_message)
ifcheck_type=="warning":
# TODO(albermax) only the first warning will be shownwarnings.warn(tmp_message)
raiseNotImplementedError()
Steps to reproduce the bug
importtensorflowastfimportinnvestigatetf.compat.v1.disable_eager_execution()
model=_# create model with non-ReLU activationanalyzer=innvestigate.analyzer.LRPSequentialPresetA(model)
Expected behavior
As LRPSequentialPresetA only has a check with check_type "warning" no exception should be raised, just a warning. To fix this I changed the abovementioned snippet to:
ifcheck_type=="exception":
raiseNotAnalyzeableModelException(tmp_message)
elifcheck_type=="warning":
# TODO(albermax) only the first warning will be shownwarnings.warn(tmp_message)
else:
raiseNotImplementedError("Check type {} unkown".format(check_type))
Platform information
OS: MacOS 13.6
Python version: 3.11.5
iNNvestigate version: 2.1.1
TensorFlow version: 2.13.1
The text was updated successfully, but these errors were encountered:
Describe the bug
When creating an analyzer that uses model checks (e.g., LRPSequentialPresetA), a NotImplementedError is raised for every check that should only be a warning. This originates from the snippet (lines 120-125 in analyzer/base.py):
Steps to reproduce the bug
Expected behavior
As LRPSequentialPresetA only has a check with check_type "warning" no exception should be raised, just a warning. To fix this I changed the abovementioned snippet to:
Platform information
The text was updated successfully, but these errors were encountered: