The function, which is refered to as 'Outputs clients', here EPhiTPhi,is:

def get_EPhi(self, lengthscale_trf, lengthscale_p_trf, sf_trf, S, MU, 
SIGMA_trf, U, b, N, M): 

        # lengthscale_trf # Q
        # lengthscale_p_trf # Q
        # sf_trf # 1
        # S # M x Q
        # MU # N x Q
        # SIGMA_trf # N x Q
        # U # M x Q
        # b # M
        # N # 1
        # M # 1
        
        inv_lengthscale_p_trf, inv_lengthscale_trf = 2 * np.pi * 
lengthscale_p_trf**-1, lengthscale_trf**-1
        S_hat = inv_lengthscale_trf * S + inv_lengthscale_p_trf # N x Q
        EPhi = (2 * sf_trf/M)**0.5 * T.exp(-0.5 * ((S_hat**2)[None,:, :] * 
SIGMA_trf[:, None, :]).sum(2)) * T.cos((S_hat[None,:, :] * (MU[:, None, :] - 
U[None, :, :])).sum(2) + b)  # N x M
        
        S_hat_U_b =  (S_hat * U).sum(1)[:,None] + b # M x M
        big_sum_minus = S_hat_U_b - S_hat_U_b.T # M x M
        big_sum_plus = S_hat_U_b + S_hat_U_b.T # M x M
        S_hat_minus = S_hat[None,:,:] - S_hat[:,None,:] # M x M x Q
        S_hat_plus = S_hat[None,:,:] + S_hat[:,None,:] # M x M x Q 
        EPhiTPhi = (sf_trf/M) * (T.exp(-0.5 * ((S_hat_minus**2)[ :, :,None, 
:] * SIGMA_trf[None,None, :, :]).sum(3)) * T.cos((S_hat_minus[ :, :,None, :] 
* (MU[None,None, :, :] - U[:,None,None, :])).sum(3) + big_sum_minus[ :, :,
None]) + T.exp(-0.5 * ((S_hat_plus**2)[ :, :,None, :] * SIGMA_trf[None,None, 
:, :]).sum(3)) * T.cos((S_hat_plus[ :, :,None, :] * (MU[None,None, :, :] - U
[:,None,None, :])).sum(3) + big_sum_plus[ :, :,None])).sum(2) # M x M 
        
        return EPhi, EPhiTPhi


Is there something wrong?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to