b68db1aaf6abe4d2cea8321cc6f1564228dd60f5,deepchem/models/tensorgraph/models/seqtoseq.py,SeqToSeq,predict_from_embeddings,#SeqToSeq#Any#Any#,254

Before Change


          embedding_array[i] = e
        feed_dict = {}
        feed_dict[self.embedding] = embedding_array
        feed_dict[self._training_placeholder] = 0.0
        for initial, zero in zip(self.rnn_initial_states, self.rnn_zero_states):
          feed_dict[initial] = zero
        probs = self.session.run(self.output, feed_dict=feed_dict)

After Change


      for i, e in enumerate(batch):
        embedding_array[i] = e
      probs = self.decoder(embedding_array, training=False)
      if tf.executing_eagerly():
        probs = probs.numpy()
      else:
        probs = probs.eval(session=self.session)
      for i in range(len(batch)):
        result.append(self._beam_search(probs[i], beam_width))
    return result
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: predict_from_embeddings


Project Name: deepchem/deepchem
Commit Name: 9c51193d4203f796c2adeca69b29a4ea168d7ceb
Time: 2019-06-20
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/gan.py
Class Name: GAN
Method Name: predict_gan_generator


Project Name: tensorflow/datasets
Commit Name: 4a64b2963ab7f0d49ea399677834a2a867b753e4
Time: 2020-06-18
Author: cs17btech11040@iith.ac.in
File Name: tensorflow_datasets/scripts/benchmark_dataset.py
Class Name:
Method Name: main