Keras implement of Lookahead Optimizer: k steps forward, 1 step back.
Usage:
model.compile(optimizer=Adam(1e-3), loss='mse') # Any optimizer
lookahead = Lookahead(k=5, alpha=0.5) # Initialize Lookahead
lookahead.inject(model) # add into model
论文《Lookahead Optimizer: k steps forward, 1 step back》的Keras实现。
用法:
model.compile(optimizer=Adam(1e-3), loss='mse') # 用你想用的优化器
lookahead = Lookahead(k=5, alpha=0.5) # 初始化Lookahead
lookahead.inject(model) # 插入到模型中
中文介绍:点击进入
QQ交流群:67729435,微信群请加机器人微信号spaces_ac_cn