shenweichen / DeepCTR

Easy-to-use,Modular and Extendible package of deep-learning based CTR models .
https://deepctr-doc.readthedocs.io/en/latest/index.html
Apache License 2.0
7.54k stars 2.21k forks source link

AutoInt模型疑问 #214

Closed WegenPan closed 3 years ago

WegenPan commented 4 years ago

Please refer to the FAQ in doc and search for the related issues before you ask the question.

Describe the question(问题描述) 关于AutoInt模型代码实现的一个疑问

Additional context 这部分的代码中,仅将sparse特征进行embedding处理,然后作为InteractingLayer的输入。在AutoInt的论文中将dense特征也进行embedding且输入到InteractingLayer,与这里的代码有些出入。 sparse_embedding_list, dense_value_list = input_from_feature_columns(features, dnn_feature_columns, l2_reg_embedding, init_std, seed) linear_logit = get_linear_logit(features, linear_feature_columns, init_std=init_std, seed=seed, refix='linear',l2_reg=l2_reg_linear) att_input = concat_func(sparse_embeddinglist, axis=1) for in range(att_layer_num): att_input = InteractingLayer( att_embedding_size, att_head_num, att_res)(att_input) att_output = tf.keras.layers.Flatten()(att_input)

希望您能解答下~ Operating environment(运行环境):

shenweichen commented 4 years ago

嗯 这里主要是为了和其他模型保持io尽量一致,所以没有单独对dense feature做embedding处理。在v0.2.2版本中,我们是统一将dense feature进行embedding处理,后来考虑到更多的灵活性就没有支持这个功能了。

WegenPan commented 4 years ago

嗯 这里主要是为了和其他模型保持io尽量一致,所以没有单独对dense feature做embedding处理。在v0.2.2版本中,我们是统一将dense feature进行embedding处理,后来考虑到更多的灵活性就没有支持这个功能了。

明白了,感谢