January 2019
Intermediate to advanced
316 pages
8h 16m
English
The code inside this sub-section is a continuation of the code in the last section. Here, you will see how to train the discriminator networks:
batchA = imagesA[index * batch_size:(index + 1) * batch_size] batchB = imagesB[index * batch_size:(index + 1) * batch_size]
generatedB = generatorAToB.predict(batchA) generatedA = generatorBToA.predict(batchB)
dALoss1 = discriminatorA.train_on_batch(batchA, real_labels)Read now
Unlock full access