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):
if check_type == "exception":
raise NotAnalyzeableModelException(tmp_message)
if check_type == "warning":
# TODO(albermax) only the first warning will be shown
warnings.warn(tmp_message)
raise NotImplementedError()
Steps to reproduce the bug
import tensorflow as tf
import innvestigate
tf.compat.v1.disable_eager_execution()
model = _ # create model with non-ReLU activation
analyzer = 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:
if check_type == "exception":
raise NotAnalyzeableModelException(tmp_message)
elif check_type == "warning":
# TODO(albermax) only the first warning will be shown
warnings.warn(tmp_message)
else:
raise NotImplementedError("Check type {} unkown".format(check_type))
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