Skip to content

Commit e3631b7

Browse files
Update score_function_estimators.py
1 parent 4764e35 commit e3631b7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

DeterministicParticleFlowControl/score_estimators/score_function_estimators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def K(x,y,l,multil=False):
401401
if multil:
402402
res = np.ones((x.shape[0],y.shape[0]))
403403
for ii in range(len(l)):
404-
tempi = np.zeros((x[:,ii].size, y[:,ii].size ))
404+
#tempi = np.zeros((x[:,ii].size, y[:,ii].size ))
405405
##puts into tempi the cdist result
406406
#my_cdist(x[:,ii].reshape(-1,1), y[:,ii].reshape(-1,1),tempi, 'l1')
407407
#res = np.multiply(res, np.exp(- 2* (np.sin(tempi/ 2 )**2) /(l[ii]*l[ii])) )
@@ -416,7 +416,7 @@ def K(x,y,l,multil=False):
416416
return res
417417

418418
def grdx_K(x,y,l,which_dim=1,multil=False): #gradient with respect to the 1st argument - only which_dim
419-
N,dim = x.shape
419+
#N,dim = x.shape
420420
diffs = x[:,None]-y
421421
#redifs = np.zeros((1*N,N))
422422
ii = which_dim -1
@@ -549,7 +549,7 @@ def K(x,y,l,multil=False):
549549
return np.exp(-cdist(x, y,'sqeuclidean')/(2*l*l))
550550

551551
def grdx_K(x,y,l,which_dim=1,multil=False): #gradient with respect to the 1st argument - only which_dim
552-
N,dim = x.shape
552+
#N,dim = x.shape
553553
diffs = x[:,None]-y
554554
#redifs = np.zeros((1*N,N))
555555
ii = which_dim -1
@@ -560,7 +560,7 @@ def grdx_K(x,y,l,which_dim=1,multil=False): #gradient with respect to the 1st ar
560560
return redifs
561561

562562
def grdy_K(x,y): # gradient with respect to the second argument
563-
N,dim = x.shape
563+
#N,dim = x.shape
564564
diffs = x[:,None]-y
565565
#redifs = np.zeros((N,N))
566566
ii = which_dim -1

0 commit comments

Comments
 (0)