Commit 74eceee2 authored by 郭羽's avatar 郭羽

service model 优化

parent 36e8047b
...@@ -83,7 +83,7 @@ def getTrainColumns(train_columns,data_vocab): ...@@ -83,7 +83,7 @@ def getTrainColumns(train_columns,data_vocab):
emb_columns.append(col) emb_columns.append(col)
inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='string') inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='string')
elif feature.endswith("_number"): elif feature.endswith("_number") and feature.startswith("item"):
col = tf.feature_column.numeric_column(feature) col = tf.feature_column.numeric_column(feature)
number_columns.append(col) number_columns.append(col)
inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='float32') inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='float32')
...@@ -112,7 +112,7 @@ def train(emb_columns, number_columns, inputs, train_dataset): ...@@ -112,7 +112,7 @@ def train(emb_columns, number_columns, inputs, train_dataset):
# train the model # train the model
print("train start...") print("train start...")
model.fit(train_dataset, epochs=5) model.fit(train_dataset, epochs=1)
print("train end...") print("train end...")
print("train save...") print("train save...")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment