2fe1f942de95b3fe11acb4881c8f18f65d73bd8e,deepexplain/tensorflow/methods.py,,deepexplain_grad,#Any#Any#,109

Before Change


    //print (mode)
    cases = OrderedDict(
        (
            (tf.equal(mode, flag), lambda: method_class.nonlinearity_grad_override(op, grad))
            for method, (method_class, flag) in attribution_methods.items()
        )
    )
    return tf.case(cases, default=lambda: grad * grad_activation(op.name)(op.inputs[0]))

After Change


        input = op.inputs[0]
        return grad * grad_activation(op.name)(input)

    cases = OrderedDict({
        tf.equal(mode, 0): (lambda: DummyZero.nonlinearity_grad_override(op, grad)),
        tf.equal(mode, 1): (lambda: Saliency.nonlinearity_grad_override(op, grad)),
        tf.equal(mode, 2): (lambda: GradientXInput.nonlinearity_grad_override(op, grad)),
        tf.equal(mode, 3): (lambda: IntegratedGradients.nonlinearity_grad_override(op, grad)),
        tf.equal(mode, 4): (lambda: EpsilonLRP.nonlinearity_grad_override(op, grad)),
    })
    return tf.case(cases, default=default, exclusive=True)


Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: marcoancona/DeepExplain
Commit Name: 2fe1f942de95b3fe11acb4881c8f18f65d73bd8e
Time: 2017-11-03
Author: marco.ancona@inf.ethz.ch
File Name: deepexplain/tensorflow/methods.py
Class Name:
Method Name: deepexplain_grad


Project Name: marcoancona/DeepExplain
Commit Name: 2fe1f942de95b3fe11acb4881c8f18f65d73bd8e
Time: 2017-11-03
Author: marco.ancona@inf.ethz.ch
File Name: deepexplain/tensorflow/methods.py
Class Name:
Method Name: deepexplain_grad


Project Name: tensorflow/models
Commit Name: b045ce7d71c64336e34589d20993bbbed2399806
Time: 2019-10-03
Author: hongkuny@google.com
File Name: official/nlp/xlnet_modeling.py
Class Name: TransformerXLModel
Method Name: call


Project Name: craffel/mir_eval
Commit Name: ac94d1ce59c97a1bc9217daf7d20d3d5220dad42
Time: 2020-04-06
Author: rmb456@nyu.edu
File Name: mir_eval/melody.py
Class Name:
Method Name: resample_melody_series