Commit 9117d53e authored by 郭羽's avatar 郭羽

service model 优化

parent 271c12c8
...@@ -83,10 +83,10 @@ def getTrainColumns(train_columns,data_vocab): ...@@ -83,10 +83,10 @@ 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"):
# 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')
return emb_columns,number_columns,inputs return emb_columns,number_columns,inputs
...@@ -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=1) model.fit(train_dataset, epochs=5)
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