MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / adjust_learning_rate_warm

Function adjust_learning_rate_warm

optimizer.py:222–228  ·  view source on GitHub ↗
(opt, optimizer, epoch)

Source from the content-addressed store, hash-verified

220 return (base_lr/warm_epoch)*(epoch+1)
221
222def adjust_learning_rate_warm(opt, optimizer, epoch):
223 lr = lr_warm(opt.base_lr, epoch, 2) # lr_warm(config['optimizer']['base_lr'], epoch,config['train']['warmepochs'])
224 optimizer.param_groups[0]['lr'] = lr
225 if 'TPS' in opt.Transformation:
226 stn_lr = opt.base_lr # config['model']['STN']['stn_lr']
227 lr = lr_warm(stn_lr, epoch, 2) # lr_warm(stn_lr, epoch,config['train']['warmepochs'])
228 optimizer.param_groups[1]['lr'] = lr
229
230
231def adjust_learning_rate_cos(opt, optimizer, epoch):

Callers

nothing calls this directly

Calls 1

lr_warmFunction · 0.85

Tested by

no test coverage detected