pytorch-CycleGAN-and-pix2pix icon indicating copy to clipboard operation
pytorch-CycleGAN-and-pix2pix copied to clipboard

Regarding epoch value in network.py file

Open CBD88 opened this issue 3 years ago • 1 comments

How the current epoch value is passed to below function in network.py file?

def lambda_rule(epoch): lr_l = 1.0 - max(0, epoch + opt.epoch_count - opt.n_epochs) / float(opt.n_epochs_decay + 1)

How can i get current epoch value outside this function in network.py?

CBD88 avatar Jan 18 '22 11:01 CBD88

You should be able to call scheduler.get_last_lr() within the update_learning_rate() function.

junyanz avatar Jan 20 '22 23:01 junyanz