82efc6f939e274545910a0a8b675348255631299,deepctr/layers.py,AFMLayer,call,#AFMLayer#,112
Before Change
bi_interaction = inner_product
attention_temp = Dense(self.attention_factor,"relu",kernel_regularizer=l2(self.l2_reg_w))(bi_interaction)
attention_weight = softmax(K.dot(attention_temp, self.projection_h),axis=1)
attention_output = K.sum(attention_weight*bi_interaction,axis=1)
attention_output = tf.nn.dropout(attention_output,self.keep_prob,seed=1024)
After Change
inner_product = p * q
bi_interaction = inner_product
attention_temp = tf.nn.relu(tf.nn.bias_add(tf.tensordot(bi_interaction,self.attention_W,axes=(-1,0)),self.attention_b))
// Dense(self.attention_factor,"relu",kernel_regularizer=l2(self.l2_reg_w))(bi_interaction)
attention_weight =tf.nn.softmax(tf.tensordot(attention_temp,self.projection_h,axes=(-1,0)),dim=1)
attention_output = tf.reduce_sum(attention_weight*bi_interaction,axis=1)
attention_output = tf.nn.dropout(attention_output,self.keep_prob,seed=1024)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: shenweichen/DeepCTR
Commit Name: 82efc6f939e274545910a0a8b675348255631299
Time: 2018-12-07
Author: last.fantasy@qq.com
File Name: deepctr/layers.py
Class Name: AFMLayer
Method Name: call
Project Name: shenweichen/DeepCTR
Commit Name: 82efc6f939e274545910a0a8b675348255631299
Time: 2018-12-07
Author: last.fantasy@qq.com
File Name: deepctr/layers.py
Class Name: AFMLayer
Method Name: call
Project Name: shenweichen/DeepCTR
Commit Name: 82efc6f939e274545910a0a8b675348255631299
Time: 2018-12-07
Author: last.fantasy@qq.com
File Name: deepctr/layers.py
Class Name: LocalActivationUnit
Method Name: call
Project Name: shenweichen/DeepCTR
Commit Name: 82efc6f939e274545910a0a8b675348255631299
Time: 2018-12-07
Author: last.fantasy@qq.com
File Name: deepctr/layers.py
Class Name: MLP
Method Name: call