Learning rate schedule of the pix2pix algorithm

I was trying to implement pix2pix exactly the same as the original code used by the authors. I have checked the author’s code on GitHub and I found that they have used a learning rate schedule, but due to the complexity of the code I couldn’t figure out how they scheduled the learning rate. The code can be found in this link: GitHub - junyanz/pytorch-CycleGAN-and-pix2pix: Image-to-Image Translation in PyTorch
I would really appreciate it if anyone helps me with that :pray:

Hi @Reza_Aalaei

The default value of the learning rate scheduling policy is “linear”. You can verify the same in –lr_policy command line parameter, and also you can see the other valid options to schedule the learning rate. As per the linear rule, after the “n” number of epochs, the learning rate starts to decay to zero for the next “m” epochs, and the training ends.

Now, the code for the scheduler is given in the networks.py file. Based on the strategy passed in the command line, the required rule is applied to the optimizer.

Now, the optimizers for Pix2Pix are present in the pix2pix_model.py file.

I hope it solves your quest to find the right LR scheduling strategy in the code. Let me know if you have any questions.