diff --git a/keras_declarative/util.py b/keras_declarative/util.py index 601e3f4..2cac10d 100644 --- a/keras_declarative/util.py +++ b/keras_declarative/util.py @@ -312,7 +312,7 @@ def _build_hypermodel(self, hp): model.load_weights( self._get_checkpoint_fname( - history_trial.trial_id, history_trial.best_step + history_trial.trial_id #, history_trial.best_step ) ) return model diff --git a/keras_declarative/workflows.py b/keras_declarative/workflows.py index 71f42b2..fc16cfa 100644 --- a/keras_declarative/workflows.py +++ b/keras_declarative/workflows.py @@ -26,6 +26,12 @@ import numpy as np import pandas as pd import tensorflow as tf +try: + physical_devices = tf.config.experimental.list_physical_devices('GPU') + tf.config.experimental.set_memory_growth(physical_devices[0], True) + print('setting Memory Growth (for simultaneous preproc and training OJ)') +except: + print('FAILED: setting Memory Growth (for simultaneous preproc and training OJ)') import tensorflow_datasets as tfds import tensorflow_io as tfio