1. 学习率调整

 https://www.cnblogs.com/kailugaji/p/11230474.html

function lr = fcn(t,Lr_max,Lr_min,decay_steps)

n=floor(t/decay_steps);
cosine_decay = 0.5 * (1 + cos(pi * (t-n*decay_steps) / decay_steps));
lr = (Lr_max - Lr_min) * cosine_decay + Lr_min;
% lr = lr.*(1./2.^(n));

 

 posted on 2022-07-12 18:26  Real_Yuan  阅读(189)  评论(0)    收藏  举报