|
Algorithm 1. Ad CycleGAN Optimization |
| 1: |
for number of epochs do
|
| 2: |
for number of batches do
|
| 3: |
Sample minibatch
|
| 4: |
Sample minibatch
|
| 5: |
Generate m synthetic samples of
|
| 6: |
|
| 7: |
|
| 8: |
Compute the Adversarial loss |
| 9: |
|
| 10: |
|
| 11: |
Generate m cycle sample of
|
| 12: |
|
| 13: |
|
| 14: |
Compute the Cycle loss |
| 15: |
|
| 16: |
Generate m identical sample of
|
| 17: |
|
| 18: |
|
| 19: |
Compute the identity loss |
| 20: |
|
| 21: |
Compute the criterion loss for cycle sample:
|
| 22: |
Compute the criterion loss for identical sample:
|
| 23: |
Compute the total generator loss |
| 24: |
|
| 25 |
Update the Discriminator
|
| 26: |
|
| 27: |
|
| 28: |
Update the Generators
|
| 29: |
|
| 30: |
end do
|
| 31: |
end do
|