0e4c63562cca4d55cfe04b70f49b42c07336003e,pytext/models/representations/huggingface_bert_sentence_encoder.py,HuggingFaceBertSentenceEncoder,_encoder,#HuggingFaceBertSentenceEncoder#Any#,86
Before Change
def _encoder(self, input_tuple: Tuple[torch.Tensor, ...]):
tokens, pad_mask, segment_labels, _ = input_tuple
return self.bert(tokens, segment_labels, pad_mask)
def _embedding(self):
// used to tie weights in MaskedLM model
return self.bert.embeddings.word_embeddings
After Change
tokens, pad_mask, segment_labels, _ = input_tuple
encoded_layers, pooled_output = self.bert(tokens, segment_labels, pad_mask)
if self.projection:
pooled_output = self.projection(pooled_output).tanh()
return encoded_layers, pooled_output
def _embedding(self):
// used to tie weights in MaskedLM model
return self.bert.embeddings.word_embeddings
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: facebookresearch/pytext
Commit Name: 0e4c63562cca4d55cfe04b70f49b42c07336003e
Time: 2020-03-10
Author: kushall@fb.com
File Name: pytext/models/representations/huggingface_bert_sentence_encoder.py
Class Name: HuggingFaceBertSentenceEncoder
Method Name: _encoder
Project Name: geomstats/geomstats
Commit Name: a5cc0f146b58e98de88724d47a1f1516d9f14bb0
Time: 2020-08-13
Author: thomas.l.p.gerald@gmail.com
File Name: geomstats/geometry/poincare_ball.py
Class Name: PoincareBallMetric
Method Name: mobius_add
Project Name: geomstats/geomstats
Commit Name: 69d5cc0ac1c0b91f14a29946ab5f0bfbc87b0ef9
Time: 2020-07-21
Author: thomas.l.p.gerald@gmail.com
File Name: geomstats/geometry/poincare_ball.py
Class Name: PoincareBallMetric
Method Name: mobius_add
Project Name: allenai/allennlp
Commit Name: b72c838d5f2ba0ed980c2112ae91af05f83664f9
Time: 2018-04-12
Author: mattg@allenai.org
File Name: allennlp/modules/token_embedders/elmo_token_embedder.py
Class Name: ElmoTokenEmbedder
Method Name: forward