f0e65fb964fd69b696e881f797d414cc3ee3836c,finetune/input_pipeline.py,BasePipeline,_array_format,#BasePipeline#Any#Any#,64

Before Change



        if encoded_output.context is not None:
            context_arr = np.empty((self.config.max_length, self.config.context_dim), dtype="object")
            context_arr.fill((pad_token or self.config.pad_token))

        // BPE embedding
        x[:seq_length, 0] = encoded_output.token_ids
        // masking: value of 1 means "consider this in cross-entropy LM loss"

After Change


        if encoded_output.context is not None:
            if len(np.shape(encoded_output.context)) == 3:
                context_arr[:seq_length][:] = np.squeeze(encoded_output.context)
            elif len(np.shape(encoded_output.context)) == 2:
                context_arr[:seq_length][:] = np.squeeze(encoded_output.context)
            else:
                raise FinetuneError("Incorrect context rank.")

        // positional_embeddings
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: f0e65fb964fd69b696e881f797d414cc3ee3836c
Time: 2019-08-02
Author: matthew.bayer@indico.io
File Name: finetune/input_pipeline.py
Class Name: BasePipeline
Method Name: _array_format


Project Name: sony/nnabla-examples
Commit Name: 56926bc8b4a158e1c40cddbc795303bc6a66f44d
Time: 2019-05-23
Author: sukriti.mehrotra@sony.com
File Name: semantic-segmentation/deeplabv3plus/train.py
Class Name:
Method Name: get_model


Project Name: rtavenar/tslearn
Commit Name: bc93cb5618026383b21ef4feb4a345af51a9ace8
Time: 2017-05-24
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/clustering.py
Class Name: GlobalAlignmentKernelKMeans
Method Name: fit