Skip to content

Commit

Permalink
dice
Browse files Browse the repository at this point in the history
  • Loading branch information
shataowei committed Dec 20, 2019
1 parent 4b498b4 commit 067a98f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
21 changes: 10 additions & 11 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
- [主要使用了什么机制](推荐/DIN.md#L164)
- [activation unit的作用](推荐/DIN.md#L164)
- [DICE怎么设计的](推荐/DIN.md#L164)
- [DICE使用的过程中,有什么需要注意的地方](推荐/DIN.md#L164)
- DeepFM
- [DNN与DeepFM之间的区别](推荐/DeepFM.md#L164)
- [Wide&Deep与DeepFM之间的区别](推荐/DeepFM.md#L164)
Expand Down
9 changes: 7 additions & 2 deletions 推荐/DIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ Attention机制,针对不同的广告,用户历史行为与该广告的权
- activation unit在这种思路上,认为面对不同的对象Va兴趣的权重Wi应该也是变换而不是固定的,所以用了g(ViVa)来动态刻画不同目标下的历史行为的不同重要性

# DICE怎么设计的
- x_p=tf.sigmoid(tf.layers.batch_normalization(x, center=False, scale=False))
- aplha*(1-x_p)*x+x_p*x
- 先对input数据进行bn,在进行sigmoid归一化到0-1,再进行一个加权平衡alpha*(1-x_p)`*`x+x_p`*`x
- x_p=tf.sigmoid(tf.layers.batch_normalization(x, center=False, scale=False,training=True))
- aplha*(1-x_p)*x+x_p*x

# DICE使用的过程中,有什么需要注意的地方
- 在用batch_normalization的时候,需要设置traning=True,否则在做test的时候,获取不到training过程中的各batch的期望
- test的时候,方差计算利用的是期望的无偏估计计算方法:E(u^2)`*`m/(m-1)

0 comments on commit 067a98f

Please sign in to comment.