shenweichen / DeepCTR-Torch

【PyTorch】Easy-to-use,Modular and Extendible package of deep-learning based CTR models.
https://deepctr-torch.readthedocs.io/en/latest/index.html
Apache License 2.0
3.02k stars 705 forks source link

DIN模型的正则项 #203

Closed wjj5881005 closed 3 years ago

wjj5881005 commented 3 years ago

DIN模型中的正则项貌似把item sequence序列也加上去了。 self.add_regularization_weight(self.embedding_dict.parameters(), l2=l2_reg_embedding)

embedding_dict包含了每个item的嵌入表示,但是后面hist_iid中每个item就单独建立一个embedding,难道hist_iid和item字段的中同一个物品的嵌入表示难道还不共享么?

zanshuxun commented 3 years ago

可以通过指定embedding_name实现共享,参考run_dien.py