From 16092f29cf43cbf1ec908b668de64b05c411ad3b Mon Sep 17 00:00:00 2001 From: yangjian Date: Wed, 12 Aug 2020 20:58:36 +0800 Subject: [PATCH] Compatible with TF2.3 #25 --- deeptables/models/deepmodel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deeptables/models/deepmodel.py b/deeptables/models/deepmodel.py index 8c57b72..fc177bd 100644 --- a/deeptables/models/deepmodel.py +++ b/deeptables/models/deepmodel.py @@ -39,7 +39,8 @@ def __init__(self, self.model_file = model_file self.model = None if model_file is not None: - self.model = load_model(model_file, dt_custom_objects) # fixme `load_model` executed multiple times in a process, resulting in a metric name rename to like auc_1, auc_2 + self.model = load_model(model_file, + dt_custom_objects) # fixme `load_model` executed multiple times in a process, resulting in a metric name rename to like auc_1, auc_2 def fit(self, X=None, y=None, batch_size=128, epochs=1, verbose=1, callbacks=None, validation_split=0.2, validation_data=None, shuffle=True, @@ -293,7 +294,7 @@ def __build_denses(self, continuous_columns, continuous_inputs, dense_dropout, u dense_layer = None if continuous_inputs: if len(continuous_inputs) > 1: - dense_layer = Concatenate(name=consts.LAYER_NAME_CONCAT_CONT_INPUTS)(continuous_inputs.values()) + dense_layer = Concatenate(name=consts.LAYER_NAME_CONCAT_CONT_INPUTS)(list(continuous_inputs.values())) else: dense_layer = list(continuous_inputs.values())[0] if dense_dropout > 0: @@ -425,4 +426,3 @@ def __getitem__(self, item): if not isinstance(item, str): raise KeyError(f"Key should be str but is {item}") return self.data[item.lower()] -