From 3e2f6081639051cb1363cb69a7f5b7499a373d06 Mon Sep 17 00:00:00 2001 From: Robert Stephany Date: Wed, 23 Oct 2024 15:24:03 -0700 Subject: [PATCH] Fixed bugs gplasdi had an instance of np.Inf (which is depricated). I also fixed a typo in latent_spaces.py --- src/lasdi/gplasdi.py | 2 +- src/lasdi/latent_space.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lasdi/gplasdi.py b/src/lasdi/gplasdi.py index ac3d046..5131f24 100644 --- a/src/lasdi/gplasdi.py +++ b/src/lasdi/gplasdi.py @@ -138,7 +138,7 @@ def __init__(self, physics, autoencoder, latent_dynamics, param_space, config): else: self.device = 'cpu' - self.best_loss = np.Inf + self.best_loss = np.inf self.best_coefs = None self.restart_iter = 0 diff --git a/src/lasdi/latent_space.py b/src/lasdi/latent_space.py index fb664fe..2e78542 100644 --- a/src/lasdi/latent_space.py +++ b/src/lasdi/latent_space.py @@ -386,7 +386,7 @@ def __init__(self, physics : Physics, config : dict) -> None: value = value); self.decoder = MultiLayerPerceptron( - latent_sizes = layer_sizes[::-1], # Reverses the order of the the list. + layer_sizes = layer_sizes[::-1], # Reverses the order of the the list. act_type = act_type, reshape_index = -1, reshape_shape = self.qgrid_size, # We need to reshape the network output to a fom frame.