8b79f460070e04e09ef799bd37c282946715cca7,thinc/neural/_classes/multiheaded_attention.py,MultiHeadedAttention,__init__,#MultiHeadedAttention#,18
Before Change
self.nH = nH
self.nM = nM // model size: the length of the embeddings
self.nD = nM // nH
self.linears = [with_reshape(Affine(nM, nM)) for i in range(4)]
self._layers = list(self.linears)
def begin_update(self, input, drop=0.0):
After Change
self.nD = nM // nH
self.get_queries = with_reshape(Affine(nM, nM))
self.get_keys = with_reshape(Affine(nM, nM))
self.get_values = with_reshape(Affine(nM, nM))
self.get_output = with_reshape(Affine(nM, nM))
self._layers = [self.get_queries, self.get_keys, self.get_values, self.get_output]
def begin_update(self, input, drop=0.0):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: explosion/thinc
Commit Name: 8b79f460070e04e09ef799bd37c282946715cca7
Time: 2019-06-03
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/multiheaded_attention.py
Class Name: MultiHeadedAttention
Method Name: __init__
Project Name: explosion/thinc
Commit Name: 8701128a21b2460583687d7ac77fc5bf3fb65356
Time: 2019-06-03
Author: honnibal+gh@gmail.com
File Name: thinc/neural/_classes/multiheaded_attention.py
Class Name: MultiHeadedAttention
Method Name: __init__
Project Name: ncullen93/torchsample
Commit Name: a7d92f7020dfe8854430ef13ed2923b2606a6262
Time: 2017-05-11
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/affine_transforms.py
Class Name: RandomAffine
Method Name: __call__