deep-ctr-prediction icon indicating copy to clipboard operation
deep-ctr-prediction copied to clipboard

DIN 序列特征

Open shelson-woo opened this issue 3 years ago • 3 comments

你好,请问一下,在你构建序列特征attention 部分时,看到你写了个din_feature_column.py, 你是想用feature_column 的方法构建序列特征么?但是我看你实现的时候确是下面的代码。
last_click_creativeid = tf.string_to_hash_bucket_fast(features["user_click_creatives_att"], 200000) creativeid_embeddings = tf.get_variable(name="attention_creativeid_embeddings", dtype=tf.float32, shape=[200000, 20]) last_click_creativeid_emb = tf.nn.embedding_lookup(creativeid_embeddings, last_click_creativeid) att_creativeid = tf.string_to_hash_bucket_fast(features["creative_id_att"], 200000) creativeid_emb = tf.nn.embedding_lookup(creativeid_embeddings, att_creativeid)

shelson-woo avatar Jun 02 '21 10:06 shelson-woo

这个特征没用feature_column

qiaoguan avatar Jun 03 '21 03:06 qiaoguan

这个特征没用feature_column

你好,你开始的想法是想使用feature_column 去统一实现特征构建方式么?我这边也是想用feature_column 去构建attention部分的,但是实现起来有难度,想看看你这边是否有好从想法?

shelson-woo avatar Jun 03 '21 03:06 shelson-woo

feature_column用起来是比较方便,但是它只提供了那么几种函数,有些自定义较强的功能就不太好用feature_column实现,另外还有一个可以考量的是feature_column离线/在线的速度

qiaoguan avatar Jun 03 '21 03:06 qiaoguan