5a9e9622a7309794cc0cf511080fc2bd6b73a20a,deepctr/layers/sequence.py,SequenceMultiplyLayer,call,#SequenceMultiplyLayer#Any#Any#,756
Before Change
mask = tf.transpose(mask, (0, 2, 1))
embedding_size = key_input.shape[-1]
mask = tf.tile(mask, [1, 1, embedding_size])
key_input *= mask
if len(tf.shape(value_input)) == 2:
value_input = tf.expand_dims(value_input, axis=2)
value_input = tf.tile(value_input, [1, 1, embedding_size])
return tf.multiply(key_input,value_input)
After Change
paddings = tf.ones_like(value_input) * (-2 ** 32 + 1)
else:
paddings = tf.zeros_like(value_input)
value_input = tf.where(mask, value_input, paddings)
if self.weight_normalization:
value_input = softmax(value_input,dim=1)
if len(value_input.shape) == 2:
value_input = tf.expand_dims(value_input, axis=2)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: shenweichen/DeepCTR
Commit Name: 5a9e9622a7309794cc0cf511080fc2bd6b73a20a
Time: 2019-11-06
Author: wcshen1994@163.com
File Name: deepctr/layers/sequence.py
Class Name: SequenceMultiplyLayer
Method Name: call
Project Name: tensorflow/ranking
Commit Name: 6bf3f51cd0a312da842157665663c2dad9983248
Time: 2021-01-29
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses_impl.py
Class Name: ClickEMLoss
Method Name: _compute_latent_prob
Project Name: dmlc/gluon-cv
Commit Name: 5bc2c075733e672a9a7c5e14bc474788f88e90de
Time: 2019-12-06
Author: jerryzh.cn@gmail.com
File Name: gluoncv/utils/viz/mask.py
Class Name:
Method Name: expand_mask