6ed7ad98f7a9466b4a9940119f02c67ff430a29e,deepexplain/tensorflow/methods.py,,original_grad,#Any#Any#,39
Before Change
def original_grad(op, grad):
a_name = next((x for x in SUPPORTED_ACTIVATIONS if x in op.name.lower()), None)
if a_name is None:
raise RuntimeError("Activation function (%s) not supported" % op.name.lower())
f = getattr(nn_grad, "_%sGrad" % a_name.capitalize())
return f(op, grad)
After Change
def original_grad(op, grad):
if op.type not in SUPPORTED_ACTIVATIONS:
warnings.warn("Activation function (%s) not supported" % op.type)
f = getattr(nn_grad, "_%sGrad" % op.type)
return f(op, grad)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: marcoancona/DeepExplain
Commit Name: 6ed7ad98f7a9466b4a9940119f02c67ff430a29e
Time: 2017-11-06
Author: marco.ancona@inf.ethz.ch
File Name: deepexplain/tensorflow/methods.py
Class Name:
Method Name: original_grad
Project Name: marcoancona/DeepExplain
Commit Name: 6ed7ad98f7a9466b4a9940119f02c67ff430a29e
Time: 2017-11-06
Author: marco.ancona@inf.ethz.ch
File Name: deepexplain/tensorflow/methods.py
Class Name:
Method Name: activation
Project Name: ilastik/ilastik
Commit Name: fa17621d9c8c5e5a0b7f9a89be489dd0c5ba0445
Time: 2012-07-11
Author: bergs@janelia.hhmi.org
File Name: ilastik-shell/applets/pixelClassification/pixelClassificationSerializer.py
Class Name: PixelClassificationSerializer
Method Name: _serializePredictions