a482347287c80e17849b9b32ad65be16aab5db80,tests/chainerx_tests/unit_tests/routines_tests/test_activation.py,TestSoftplus,func,#TestSoftplus#Any#Any#,334
Before Change
def func(self, xp, a):
in_dtype, = self.in_dtypes
if xp is numpy:
y = numpy.log(1 + numpy.exp(self.beta * a) ) / self.beta
return y
elif self.beta_range is Unspecified:
return xp.softplus(a)
After Change
if xp is numpy:
ba = self.beta * a
beta_inv = 1.0 / self.beta
y = (numpy.fmax(ba, 0) +
numpy.log1p(numpy.exp(-numpy.fabs(ba)))) * beta_inv
return y
elif self.beta_range is Unspecified:
return xp.softplus(a)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: chainer/chainer
Commit Name: a482347287c80e17849b9b32ad65be16aab5db80
Time: 2019-07-04
Author: akshaysubramanian99@gmail.com
File Name: tests/chainerx_tests/unit_tests/routines_tests/test_activation.py
Class Name: TestSoftplus
Method Name: func
Project Name: glm-tools/pyglmnet
Commit Name: b0fbaafddcb5a67eb3e4e093974c546324ccb5d0
Time: 2020-08-16
Author: giovanni.det@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name:
Method Name: _mu
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