Keras train partial model issue (about GAN model)
问题 I came across a strange issue when using keras to implement GAN model. With GAN we need to build up G and D first, and then add a new Sequential model (GAN) and add(G), add(D) sequentially afterwards. Keras seems to backprop back to G (via GAN model) when I do D.train_on_batch , and I got an InvalidArgumentError: You must feed a value for placeholder tensor 'dense_input_1' with dtype float . If I remove the GAN model (the last stacked G then D sequential model), it computes d_loss correctly.