Skip to content

Commit

Permalink
Remove self.w
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin committed Jul 16, 2024
1 parent 843550f commit f0b9a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superdsm/dsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def grad(self, params):
grad = np.sum([term1 * q for q in self.q], axis=1)
term1_sparse = coo_matrix(term1).transpose(copy=False)
if self.smooth_mat.shape[1] > 0:
grad2 = (self.w.reshape(-1)[None, :] @ self.smooth_mat.multiply(term1_sparse)).reshape(-1)
grad2 = self.smooth_mat.multiply(term1_sparse).sum(axis=0).reshape(-1)
grad2 += self.alpha * (params.ξ / self.term2)
grad = np.concatenate([grad, grad2])
return grad
Expand Down

0 comments on commit f0b9a10

Please sign in to comment.