6bff33e30c06efa25d52dfc8e8f08a337d8a731d,GPy/kern/_src/psi_comp/rbf_psi_comp.py,,__psi2computations,#,47

Before Change


    _psi2_exp1 = (np.square(Z[:,None,:]-Z[None,:,:])/lengthscale2).sum(axis=-1)/(-4.) //MxM
    Z_hat = (Z[:,None,:]+Z[None,:,:])/2. //MxMxQ
    denom = 1./(2.*S+lengthscale2)
    _psi2_exp2 = -(np.square(mu)*denom).sum(axis=-1)[:,None,None]+2.*np.einsum("nq,moq,nq->nmo",mu,Z_hat,denom)-np.einsum("moq,nq->nmo",np.square(Z_hat),denom)
    _psi2 = variance*variance*np.exp(_psi2_logdenom[:,None,None]+_psi2_exp1[None,:,:]+_psi2_exp2)


    return _psi2

After Change


    _psi2_exp1 = (np.square(Z[:,None,:]-Z[None,:,:])/lengthscale2).sum(axis=-1)/(-4.) //MxM
    Z_hat = (Z[:,None,:]+Z[None,:,:])/2. //MxMxQ
    denom = 1./(2.*S+lengthscale2)
    _psi2_exp2 = -(np.square(mu)*denom).sum(axis=-1)[:,None,None]+(2*(mu*denom).dot(Z_hat.reshape(M*M,Q).T) - denom.dot(np.square(Z_hat).reshape(M*M,Q).T)).reshape(N,M,M)
    _psi2 = variance*variance*np.exp(_psi2_logdenom[:,None,None]+_psi2_exp1[None,:,:]+_psi2_exp2)
    return _psi2
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: SheffieldML/GPy
Commit Name: 6bff33e30c06efa25d52dfc8e8f08a337d8a731d
Time: 2015-08-12
Author: z.dai@sheffield.ac.uk
File Name: GPy/kern/_src/psi_comp/rbf_psi_comp.py
Class Name:
Method Name: __psi2computations


Project Name: salu133445/musegan
Commit Name: efc4b020f1458ed46aab5fb9894d0783de0f66c6
Time: 2018-03-13
Author: salu133445@gmail.com
File Name: musegan/components.py
Class Name: Temporal
Method Name: _build_discriminator


Project Name: salu133445/musegan
Commit Name: efc4b020f1458ed46aab5fb9894d0783de0f66c6
Time: 2018-03-13
Author: salu133445@gmail.com
File Name: musegan/components.py
Class Name: Nowbar
Method Name: _build_discriminator