adfa6de1d87baced85215985da9ed2ce671c2a93,GPy/kern/rbf.py,rbf,_K_computations,#rbf#Any#Any#,185

Before Change


            self._X = X
            self._X2 = X2
            if X2 is None: X2 = X
            self._K_dist = X[:,None,:]-X2[None,:,:] // this can be computationally heavy
            self._params = np.empty(shape=(1,0))    //ensure the next section gets called
        if not np.all(self._params == self._get_params()):
            self._params == self._get_params()
            self._K_dist2 = np.square(self._K_dist/self.lengthscale)
            self._K_dvar = np.exp(-0.5*self._K_dist2.sum(-1))

    def _psi_computations(self,Z,mu,S):
        //here are the "statistics" for psi1 and psi2

After Change


            //_K_dist = X[:,None,:]-X2[None,:,:]
            //_K_dist2 = np.square(_K_dist/self.lengthscale)
            X = X/self.lengthscale
            X2 = X2/self.lengthscale
            self._K_dist2 = (-2.*np.dot(X, X2.T) + np.sum(np.square(X),1)[:,None] + np.sum(np.square(X2),1)[None,:])
            self._K_dvar = np.exp(-0.5*self._K_dist2)

    def _psi_computations(self,Z,mu,S):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: SheffieldML/GPy
Commit Name: adfa6de1d87baced85215985da9ed2ce671c2a93
Time: 2013-03-27
Author: james.hensman@gmail.com
File Name: GPy/kern/rbf.py
Class Name: rbf
Method Name: _K_computations


Project Name: SheffieldML/GPy
Commit Name: adfa6de1d87baced85215985da9ed2ce671c2a93
Time: 2013-03-27
Author: james.hensman@gmail.com
File Name: GPy/kern/rbf.py
Class Name: rbf
Method Name: dK_dtheta


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 055c61d73514d471158ee36b83762802c8d4e3d4
Time: 2018-07-14
Author: tsurumeso@gmail.com
File Name: lib/loss/clipped_weighted_huber_loss.py
Class Name: ClippedWeightedHuberLoss
Method Name: forward