cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e,keras/backend/tensorflow_backend.py,,relu,#Any#Any#Any#,954
Before Change
if max_value is not None:
x = tf.clip_by_value(x, tf.cast(0., dtype=_FLOATX),
tf.cast(max_value, dtype=_FLOATX))
if isinstance(alpha, (tuple, list, np.ndarray)) or np.isscalar(alpha):
alpha = tf.constant(alpha, dtype=_FLOATX)
x -= alpha * negative_part
return x
After Change
alpha: slope of negative section.
max_value: saturation threshold.
"""
if alpha != 0.:
negative_part = tf.nn.relu(-x)
x = tf.nn.relu(x)
if max_value is not None:
max_value = _to_tensor(max_value, x.dtype.base_dtype)
zero = _to_tensor(0., x.dtype.base_dtype)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: keras-team/keras
Commit Name: cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e
Time: 2016-07-19
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: relu
Project Name: matplotlib/matplotlib
Commit Name: 919939253e2bd570c5d2b87878379a3e72af2256
Time: 2018-09-08
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/streamplot.py
Class Name: StreamMask
Method Name: __init__
Project Name: brian-team/brian2
Commit Name: f8b5a82bde87721f9d5500c00e1505c8fd42f7b4
Time: 2018-08-28
Author: marcel.stimberg@inserm.fr
File Name: brian2/core/functions.py
Class Name:
Method Name: timestep