d21490ef8754bd9a13c95a612ed598694be4d0a3,deepchem/models/seqtoseq.py,SeqToSeq,predict_embeddings,#SeqToSeq#Any#,299

Before Change


      indices = np.array([(i, len(batch[i]) if i < len(batch) else 0)
                          for i in range(self.batch_size)])
      embeddings = self.predict_on_generator(
          [[(features, indices, self.get_global_step()), None, None]],
          outputs=self._embedding)
      for i in range(len(batch)):
        result.append(embeddings[i])

After Change


      indices = np.array([(i, len(batch[i]) if i < len(batch) else 0)
                          for i in range(self.batch_size)])
      embeddings = self.predict_on_generator(
          [[(features, indices, np.array(self.get_global_step())), None, None]],
          outputs=self._embedding)
      for i in range(len(batch)):
        result.append(embeddings[i])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepchem/deepchem
Commit Name: d21490ef8754bd9a13c95a612ed598694be4d0a3
Time: 2020-01-24
Author: peastman@stanford.edu
File Name: deepchem/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: predict_embeddings


Project Name: deepchem/deepchem
Commit Name: d21490ef8754bd9a13c95a612ed598694be4d0a3
Time: 2020-01-24
Author: peastman@stanford.edu
File Name: deepchem/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: _generate_batches


Project Name: deepchem/deepchem
Commit Name: d21490ef8754bd9a13c95a612ed598694be4d0a3
Time: 2020-01-24
Author: peastman@stanford.edu
File Name: deepchem/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: predict_from_sequences