diff --git a/src/lasdi/latent_dynamics/sindy.py b/src/lasdi/latent_dynamics/sindy.py index 25780a4..9771450 100644 --- a/src/lasdi/latent_dynamics/sindy.py +++ b/src/lasdi/latent_dynamics/sindy.py @@ -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): @@ -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 \ No newline at end of file + return param_dict