3a0ed9fe4d5097397c62b3827c260d0c2aff4fe4,src/gluonnlp/models/roberta.py,RobertaModel,hybrid_forward,#RobertaModel#Any#Any#Any#,233
Before Change
x = self.tokens_embed(tokens)
if self.pos_embed_type:
positional_embedding = self.pos_embed(F.npx.arange_like(x, axis=1))
positional_embedding = F.np.expand_dims(positional_embedding, axis=0)
x = x + positional_embedding
if self.embed_ln:
x = self.embed_ln(x)
x = self.embed_dropout(x)
inner_states = self.encoder(x, valid_length)
x = inner_states[-1]
if self.use_mlm:
After Change
embedding = self.get_initial_embedding(F, tokens)
contextual_embeddings, additional_outputs = self.encoder(embedding, valid_length)
outputs.append(contextual_embeddings)
if self._output_all_encodings:
contextual_embeddings = contextual_embeddings[-1]
if self.use_pooler:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: dmlc/gluon-nlp
Commit Name: 3a0ed9fe4d5097397c62b3827c260d0c2aff4fe4
Time: 2020-07-20
Author: 37728728+ZheyuYe@users.noreply.github.com
File Name: src/gluonnlp/models/roberta.py
Class Name: RobertaModel
Method Name: hybrid_forward
Project Name: dmlc/gluon-cv
Commit Name: 9f0b230e1f59cb399e36210483bc075760b02eaf
Time: 2018-04-11
Author: cheungchih@gmail.com
File Name: gluonvision/model_zoo/ssd/ssd.py
Class Name: SSD
Method Name: hybrid_forward
Project Name: MVIG-SJTU/AlphaPose
Commit Name: 2ab72370d6a613666508f8dfb9f28ac50186ed8f
Time: 2020-08-13
Author: 510641426@qq.com
File Name: trackers/__init__.py
Class Name:
Method Name: track