3cba7783cb805459d26918be7a56b0e8b8fd3bc9,context_encoder.py,ContextEncoder,train,#ContextEncoder#Any#Any#Any#,140
Before Change
generated_missing_parts = self.generator.predict(masked_imgs)
// Concatenate the true and generated samples
imgs_x = np.vstack((missing_parts, generated_missing_parts) )
// First half are valid and second are fake
valid_y = np.array([1] * half_batch + [0] * half_batch).reshape(-1, 1)
After Change
gen_missing = self.generator.predict(masked_imgs)
valid = np.ones((half_batch, 1))
fake = np.zeros((half_batch, 1))
// Train the discriminator
d_loss_real = self.discriminator.train_on_batch(missing, valid)
d_loss_fake = self.discriminator.train_on_batch(gen_missing, fake)
d_loss = 0.5 * np.add(d_loss_real, d_loss_fake)
// ---------------------
// Train Generator
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: eriklindernoren/Keras-GAN
Commit Name: 3cba7783cb805459d26918be7a56b0e8b8fd3bc9
Time: 2017-07-17
Author: eriklindernoren@live.se
File Name: context_encoder.py
Class Name: ContextEncoder
Method Name: train
Project Name: eriklindernoren/Keras-GAN
Commit Name: 744353138995f1b15933be6ee2d39f7b83ee1b1f
Time: 2017-07-16
Author: eriklindernoren@live.se
File Name: sgan.py
Class Name: SGAN
Method Name: train
Project Name: rtavenar/tslearn
Commit Name: a38a14f46715b7b0411d89c2e86854cf074c05a2
Time: 2017-09-22
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/shapelets.py
Class Name: ShapeletModel
Method Name: _set_model_layers