Skip to content

Commit

Permalink
Merge pull request #580 from nasa/hotfix/v1.5.2
Browse files Browse the repository at this point in the history
Hotfix v1.5.2
  • Loading branch information
teubert authored Jul 13, 2023
2 parents 03e23a9 + 1d56232 commit 7bdd6d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

setup(
name='prog_models',
version='1.5.1',
version='1.5.2',
description='The NASA Prognostic Model Package is a python modeling framework focused on defining and building models for prognostics (computation of remaining useful life) of engineering systems, and provides a set of prognostics models for select components developed within this framework, suitable for use in prognostics applications for these components.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion src/prog_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
from prog_models.composite_model import CompositeModel
from prog_models.linear_model import LinearModel

__version__ = '1.5.1'
__version__ = '1.5.2'
7 changes: 1 addition & 6 deletions src/prog_models/data_models/lstm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,7 @@ def from_data(cls, inputs, outputs, event_states=None, t_met=None, **kwargs):
from tensorflow import keras

# Build model
callbacks = [
keras.callbacks.ModelCheckpoint("best_model.keras", save_best_only=True)
]

callbacks = []
if params['early_stop']:
callbacks.append(keras.callbacks.EarlyStopping(**params['early_stop.cfg']))

Expand Down Expand Up @@ -592,8 +589,6 @@ def from_data(cls, inputs, outputs, event_states=None, t_met=None, **kwargs):
workers=params['workers'],
use_multiprocessing=(params['workers'] > 1))

model = keras.models.load_model("best_model.keras")

# Split model into separate models
n_state_layers = params['layers'] + 1 + (params['dropout'] > 0) + (params['normalize'])
output_layer_input = keras.layers.Input(model.layers[n_state_layers-1].output.shape[1:])
Expand Down

0 comments on commit 7bdd6d6

Please sign in to comment.