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

Before Change



        print("NUM TOKENS")
        print(seq_length)
        print("NUM CONTEXT")
        print(len(np.squeeze(encoded_output.context)))
        print("NUM LABEL")
        print(len(encoded_output.labels))
        

After Change


        if encoded_output.labels:
            labels_arr[:seq_length] = encoded_output.labels
        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
        x[:, 1] = np.arange(
            self.text_encoder.vocab_size, self.text_encoder.vocab_size + self.config.max_length
        )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: deepchem/deepchem
Commit Name: a4ab24f33a57d0ea9a807cf5b5d9248aae1c04fe
Time: 2016-01-07
Author: bharath.ramsundar@gmail.com
File Name: deepchem/utils/dataset.py
Class Name:
Method Name: compute_sums_and_nb_sample


Project Name: HyperGAN/HyperGAN
Commit Name: 7066c72279f2fd0f5d0a6b7c3c57e5398dfe7813
Time: 2018-12-05
Author: mikkel@255bits.com
File Name: examples/colorizer.py
Class Name: Sampler
Method Name: sample