16.03.2021 Views

Advanced Deep Learning with Keras

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7

Repeat for n training steps:

( )

D

1. Minimize L

forward−GAN

by training the forward-cycle discriminator using

real source and target data. A minibatch of real target data, y, is labeled

1.0. A minibatch of fake target data, y ' = G(x), is labelled 0.0.

( )

D

2. Minimize L

backward−GAN

by training the backward-cycle discriminator using

real source and target data. A minibatch of real source data, x, is labeled

1.0. A minibatch of fake source data, x ' = F(y), is labeled 0.0.

( )

G

3. Minimize L

GAN and L

cyc by training the forward-cycle and backward-cycle

generators in the adversarial networks. A minibatch of fake target data,

y ' = G(x), is labeled 1.0. A minibatch of fake source data, x ' = F(y), is labeled

1.0. The weights of discriminators are frozen.

Figure 7.1.4: During style transfer, the color composition may not be transferred successfully.

To address this issue, the identity loss is added to the total loss function.

[ 209 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!