Skip to content

Commit edcd47c

Browse files
authored
Change coefs definition when using torch (#21)
1 parent 49fe119 commit edcd47c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lasdi/latent_dynamics/sindy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def calibrate(self, Z, dt, compute_loss=True, numpy=False):
4646
if (numpy):
4747
coefs = np.zeros([n_train, self.ncoefs])
4848
else:
49-
coefs = torch.Tensor([n_train, self.ncoefs])
49+
coefs = torch.zeros([n_train, self.ncoefs])
5050
loss_sindy, loss_coef = 0.0, 0.0
5151

5252
for i in range(n_train):
@@ -120,4 +120,4 @@ def export(self):
120120
param_dict = super().export()
121121
param_dict['fd_type'] = self.fd_type
122122
param_dict['coef_norm_order'] = self.coef_norm_order
123-
return param_dict
123+
return param_dict

0 commit comments

Comments
 (0)