9c51193d4203f796c2adeca69b29a4ea168d7ceb,deepchem/models/tensorgraph/models/gan.py,GAN,predict_gan_generator,#GAN#Any#Any#Any#Any#,440
Before Change
batch_size = len(conditional_inputs[0])
if noise_input is None:
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
batch_size = len(conditional_inputs[0])
if noise_input is None:
noise_input = self.get_noise_batch(batch_size)
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):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
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: arviz-devs/arviz
Commit Name: 6b7ac72472c9d549dea45f35669e876c4c8ee2e9
Time: 2019-10-31
Author: fehiepsi@gmail.com
File Name: arviz/data/io_pyro.py
Class Name: PyroConverter
Method Name: posterior_to_xarray
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