456b9ed099cc5f7e99880371ac9d1924095769f3,GPflow/transforms.py,Log1pe,backward,#Log1pe#Any#,139
Before Change
return -tf.reduce_sum(tf.log(1. + tf.exp(-x)))
def backward(self, y):
result = np.log(np.exp(y - self._lower) - np.ones(1, np_float_type))
return np.where(y > 35, y-self._lower, result)
def __str__(self):
return "+ve"
After Change
def backward(self, y):
ys = np.maximum(y-self._lower, np.finfo(np_float_type).eps)
return ys + np.log(-np.expm1(-ys))
def __str__(self):
return "+ve"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: GPflow/GPflow
Commit Name: 456b9ed099cc5f7e99880371ac9d1924095769f3
Time: 2017-05-26
Author: joachim.vanderherten@ugent.be
File Name: GPflow/transforms.py
Class Name: Log1pe
Method Name: backward
Project Name: cornellius-gp/gpytorch
Commit Name: 556f82a5aea9383d4ac43ac338b415c092952071
Time: 2019-07-06
Author: kaw293@cornell.edu
File Name: gpytorch/utils/transforms.py
Class Name:
Method Name: inv_softplus
Project Name: pymc-devs/pymc3
Commit Name: 823906a3efcf66897eac8a4c89052d9153bca49e
Time: 2021-01-22
Author: 28983449+ricardoV94@users.noreply.github.com
File Name: pymc3/math.py
Class Name:
Method Name: log1mexp_numpy