Issue Description:

I am running CycleGAN training using Keras v3.8.0 and have observed the following behavior during the initial epoch (0/200):

Discriminator (D): The D loss starts around 0.70 (e.g., 0.695766 at batch 0) with a very low accuracy (~25%). In the next few batches, the D loss quickly decreases to approximately 0.47 and the discriminator accuracy increases and stabilizes around 49%. Generator (G): The G loss begins at approximately 17.42 and gradually decreases (e.g., reaching around 14.85 by batch 15). However, the adversarial component of the G loss remains nearly constant at roughly 0.91 throughout these batches. Both the reconstruction loss and identity loss show a slight downward trend. Questions/Concerns:

Discriminator Behavior: The discriminator accuracy quickly climbs to ~49%, which is close to random guessing (50%). Is this the expected behavior in early training stages, or might it indicate an issue with the discriminator setup?

Constant Adversarial Loss: Despite the overall generator loss decreasing, the adversarial loss remains almost unchanged (~0.91). Should I be concerned that the generator is not improving its ability to fool the discriminator, or is this typical during the initial epochs?

Next Steps: Would further hyperparameter tuning or changes in the training strategy be recommended at this stage to encourage more effective adversarial learning?

Steps to Reproduce:

Use Keras version 3.8.0. Train CycleGAN for 200 epochs on the given dataset. Observe the training logs, especially during the initial epoch (batches 0–15). Example Log Snippet:

[Epoch 0/200] [Batch 0/3400] [D loss: 0.695766, acc: 25%] [G loss: 17.421459, adv: 0.911943, recon: 0.703973, id: 0.664554] time: 0:00:54.098616 [Epoch 0/200] [Batch 1/3400] [D loss: 0.544706, acc: 41%] [G loss: 17.582617, adv: 0.913612, recon: 0.759879, id: 0.702040] time: 0:00:54.705443 [Epoch 0/200] [Batch 2/3400] [D loss: 0.516353, acc: 44%] [G loss: 17.095995, adv: 0.912766, recon: 0.749940, id: 0.726107] time: 0:00:54.945915 ... [Epoch 0/200] [Batch 15/3400] [D loss: 0.477357, acc: 49%] [G loss: 14.845922, adv: 0.901916, recon: 0.742566, id: 0.698672] time: 0:00:58.317200 Any insights or recommendations would be greatly appreciated. Thank you in advance for your help!

Comment From: dhantule

Hi @AmadeuSY-labo, thanks for reporting this. Are you trying to run this example?

Comment From: AmadeuSY-labo

Nope. I runed this code