深度学习:DeeperGoogLeNet与ResNet在图像分类中的探索
1. DeeperGoogLeNet在Tiny ImageNet上的训练与评估
在Tiny ImageNet数据集上训练DeeperGoogLeNet时,我们会根据不同情况进行模型的加载和学习率的调整。若要从特定epoch重新开始训练,需加载模型并调整学习率,代码如下:
# otherwise, load the checkpoint from disk
else:
print("[INFO] loading {}...".format(args["model"]))
model = load_model(args["model"])
# update the learning rate
print("[INFO] old learning rate: {}".format(
K.get_value(model.optimizer.lr)))
K.set_value(model.optimizer.lr, 1e-5)
print("[INFO] new learning rate: {}".format(
K.get_value(model.optimizer.lr)))
同时,我们会创建两个回调函数,一个用于每五个epoch将模型权重序列化到磁盘,另一个用于创建损失/准确率随时间变化的图表:
# construct the set of callbacks
call
超级会员免费看
订阅专栏 解锁全文
3302

被折叠的 条评论
为什么被折叠?



