aacf14504b82087378db638d8f0463bc9933cabd,benchmarks/python/rbm.py,RBM,ln1pexp,#Any#,113

Before Change


            // error -> 0 as x -> \infty
            return x
        else:
            return np.log1p(np.exp(x))

    def free_energy(self, v):
        if len(v.shape) == 2:
            free_energy_ = np.dot(v, self.visible_bias)

After Change


        overwhelms this systematic error.
        
        a = x.copy()
        a[a <= 30] = np.log1p(np.exp(a[a <= 30]))
        return a

    def free_energy(self, v):
        if len(v.shape) == 2:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: PIQuIL/QuCumber
Commit Name: aacf14504b82087378db638d8f0463bc9933cabd
Time: 2018-05-22
Author: emerali@users.noreply.github.com
File Name: benchmarks/python/rbm.py
Class Name: RBM
Method Name: ln1pexp


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