Skip to content

Commit

Permalink
Change coefs definition when using torch (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonw1 authored Dec 21, 2024
1 parent 49fe119 commit edcd47c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lasdi/latent_dynamics/sindy.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def calibrate(self, Z, dt, compute_loss=True, numpy=False):
if (numpy):
coefs = np.zeros([n_train, self.ncoefs])
else:
coefs = torch.Tensor([n_train, self.ncoefs])
coefs = torch.zeros([n_train, self.ncoefs])
loss_sindy, loss_coef = 0.0, 0.0

for i in range(n_train):
Expand Down Expand Up @@ -120,4 +120,4 @@ def export(self):
param_dict = super().export()
param_dict['fd_type'] = self.fd_type
param_dict['coef_norm_order'] = self.coef_norm_order
return param_dict
return param_dict

0 comments on commit edcd47c

Please sign in to comment.