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

service model 优化

parent 271c12c8
......@@ -83,10 +83,10 @@ def getTrainColumns(train_columns,data_vocab):
emb_columns.append(col)
inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='string')
# elif feature.endswith("_number"):
# col = tf.feature_column.numeric_column(feature)
# number_columns.append(col)
# inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='float32')
elif feature.endswith("_number"):
col = tf.feature_column.numeric_column(feature)
number_columns.append(col)
inputs[feature] = tf.keras.layers.Input(name=feature, shape=(), dtype='float32')
return emb_columns,number_columns,inputs
......@@ -112,7 +112,7 @@ def train(emb_columns, number_columns, inputs, train_dataset):
# train the model
print("train start...")
model.fit(train_dataset, epochs=1)
model.fit(train_dataset, epochs=5)
print("train end...")
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