9c51193d4203f796c2adeca69b29a4ea168d7ceb,deepchem/models/tensorgraph/models/gan.py,GAN,create_discriminator_loss,#GAN#Any#Any#,313
Before Change
training_data_loss = layers.Log(discrim_output_train + 1e-10)
gen_data_loss = layers.Log(1 - discrim_output_gen + 1e-10)
return -layers.ReduceMean(training_data_loss + gen_data_loss)
def fit_gan(self,
batches,
generator_steps=1.0,
After Change
-------
A Tensor equal to the loss function to use for optimizing the discriminator.
return Lambda(lambda x: -tf.reduce_mean(tf.log(x[0]+1e-10) + tf.log(1-x[1]+1e-10)))([discrim_output_train, discrim_output_gen] )
def fit_gan(self,
batches,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: create_discriminator_loss
Project Name: deepchem/deepchem
Commit Name: cb4ea667b426ebc6595cc0e8be81c94955266c9c
Time: 2020-03-05
Author: peastman@stanford.edu
File Name: deepchem/utils/test/test_generator_evaluator.py
Class Name: TestGeneratorEvaluator
Method Name: test_compute_model_performance_multitask_classifier
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: WGAN
Method Name: create_discriminator_loss