osh / KerasGAN

A couple of simple GANs in Keras
501 stars 177 forks source link

Checking the effect of "trainable" #1

Closed tdeboissiere closed 7 years ago

tdeboissiere commented 8 years ago

In your code, you set the discriminator to trainable without recompiling.

2 questions:

(First column: layer name, Second column: layer.trainable)

GAN input_1 False GAN dense_1 True GAN batchnormalization_1 True GAN activation_1 True GAN reshape_1 True GAN upsampling2d_1 True GAN convolution2d_1 True GAN batchnormalization_2 True GAN activation_2 True GAN convolution2d_2 True GAN batchnormalization_3 True GAN activation_3 True GAN convolution2d_3 True GAN activation_4 True GAN input_2 True GAN convolution2d_4 True GAN leakyrelu_1 True GAN dropout_1 True GAN convolution2d_5 True GAN leakyrelu_2 True GAN dropout_2 True GAN flatten_1 True GAN dense_2 True GAN leakyrelu_3 True GAN dropout_3 True GAN dense_3 True

which would imply that the GAN model actually updates the weights of the discriminator. Can you confirm whether this is the case ?

osh commented 7 years ago

just checked in update to MNIST_CNN_GAN_v2.ipynb which works with the latest Keras/TF.