Add Exponential LR scheduler check

This commit is contained in:
rishikksh20 2021-03-03 22:31:39 +05:30 committed by Eren Gölge
parent 1535777f64
commit ef6ff4e95c
1 changed files with 2 additions and 0 deletions

View File

@ -506,6 +506,8 @@ def main(args): # pylint: disable=redefined-outer-name
print(" > Restoring Discriminator LR Scheduler...")
scheduler_disc.load_state_dict(checkpoint['scheduler_disc'])
scheduler_disc.optimizer = optimizer_disc
if c.lr_scheduler_disc == "ExponentialLR":
scheduler_disc.last_epoch = checkpoint['epoch']
except RuntimeError:
# restore only matching layers.
print(" > Partial model initialization...")