a003d7d85c61bc74b88ad0d3b8d07834fe9636ea,deeppavlov/models/evolution/utils.py,Attention,call,#Attention#Any#Any#,175
Before Change
out = K.bias_add(out, self.b)
out = K.softmax(out)
out = multiply(inputs=[out, x])
return out
After Change
def call(self, x, mask=None):
expanded_context_3d = expand_tile_batch_size(memory=x, context=self.context)
expanded_context_4d = expand_tile(expanded_context_3d, axis=1, n_repetitions=K.int_shape(x)[1])
expanded_x = expand_tile(x, axis=2, n_repetitions=K.int_shape(expanded_context_3d)[1])
// now expanded_context_4d and expanded_x are of
// shape (bs, time_steps, context_size, n_features)
x_full = concatenate(inputs=[expanded_x, expanded_context_4d], axis=-1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: a003d7d85c61bc74b88ad0d3b8d07834fe9636ea
Time: 2018-06-26
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/utils.py
Class Name: Attention
Method Name: call
Project Name: deepmipt/DeepPavlov
Commit Name: 688d4ead1098429b45dc53f4fedd303e8413829d
Time: 2018-04-20
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/utils.py
Class Name: Attention
Method Name: call
Project Name: stellargraph/stellargraph
Commit Name: 59266e34e076ed25852bccf5ce13025b5408406f
Time: 2019-05-28
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/layer/gcn.py
Class Name: GCN
Method Name: __call__