a9eb2fd38180b5affbd30ec78f33f6ef16ef9c20,src/gluonnlp/model/bert.py,BERTModel,_apply_pooling,#BERTModel#Any#,462

Before Change



        This is used for pre-training or fine-tuning a BERT model.
        
        outputs = sequence[:, 0, :]
        return self.pooler(outputs)

    def _decode(self, sequence, masked_positions):
        Generate unnormalized prediction for the masked language model task.

After Change



        This is used for pre-training or fine-tuning a BERT model.
        
        outputs = sequence.slice(begin=(0, 0, 0), end=(None, 1, None))
        outputs = outputs.reshape(shape=(-1, self._units))
        return self.pooler(outputs)

    def _arange_like(self, F, inputs):
        Helper function to generate int32 indices of a range
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/gluon-nlp
Commit Name: a9eb2fd38180b5affbd30ec78f33f6ef16ef9c20
Time: 2019-08-19
Author: linhaibin.eric@gmail.com
File Name: src/gluonnlp/model/bert.py
Class Name: BERTModel
Method Name: _apply_pooling


Project Name: dmlc/gluon-cv
Commit Name: 0e97aaafdc7f797127f80a3510c4dac861174cc0
Time: 2020-10-14
Author: haofeikuang@gmail.com
File Name: gluoncv/model_zoo/monodepthv2/pose_decoder.py
Class Name: PoseDecoder
Method Name: hybrid_forward


Project Name: keras-team/keras
Commit Name: 0b04ac3117e44e9fcc0222b479a34048171462a7
Time: 2016-09-19
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: rnn