9c51193d4203f796c2adeca69b29a4ea168d7ceb,deepchem/models/tensorgraph/models/gan.py,GAN,predict_gan_generator,#GAN#Any#Any#Any#Any#,440

Before Change


      noise_input = self.get_noise_batch(batch_size)
    batch = {}
    batch[self.noise_input] = noise_input
    for layer, value in zip(self.conditional_inputs, conditional_inputs):
      batch[layer] = value
    return self.predict_on_generator(
        [batch], outputs=self.generators[generator_index])

  def _set_empty_inputs(self, feed_dict, layers):

After Change


    inputs = [noise_input]
    inputs += conditional_inputs
    inputs = [i.astype(np.float32) for i in inputs]
    pred = self.generators[generator_index](inputs, training=False)
    if tf.executing_eagerly():
      pred = pred.numpy()
    else:
      pred = pred.eval(session=self.session)
    return pred


class WGAN(GAN):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


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: osmr/imgclsmob
Commit Name: e583ae1925021107a0672e5cd4f586aef3e50452
Time: 2019-03-27
Author: osemery@gmail.com
File Name: pytorch/seg_metrics.py
Class Name: PixelAccuracyMetric
Method Name: update


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