Commit a79b70c4 authored by 郭羽's avatar 郭羽

service model 优化

parent 9117d53e
......@@ -881,7 +881,8 @@ if __name__ == '__main__':
# model columns
print("model columns to redis...")
model_columns = user_columns + item_columns
featureColumnsToRedis(model_columns)
not_model_columns = [col for col in model_columns if not col.endswith("_number")]
featureColumnsToRedis(not_model_columns)
print("数据字典save...")
print("dataVocab:", str(dataVocab.keys()))
......
......@@ -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
......
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