【问题标题】:fine-tuning with VGG on caffe在 caffe 上使用 VGG 进行微调
【发布时间】:2015-12-19 10:36:23
【问题描述】:

我正在复制中的步骤 http://caffe.berkeleyvision.org/gathered/examples/finetune_flickr_style.html

我想将网络更改为 VGG 模型,该模型在 http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel

只需将模型参数替换为以下就足够了吗?

./build/tools/caffe train -solver models/finetune_flickr_style/solver.prototxt -weights VGG_ISLVRC_16_layers.caffemodel -gpu 0

或者我是否需要调整学习率、迭代次数,即它是否带有单独的 prototxt 文件?

【问题讨论】:

    标签: neural-network deep-learning computer-vision caffe vgg-net


    【解决方案1】:

    您要训练的网络权重与您用于初始化/微调的权重之间需要存在 1-1 对应关系。新旧模型的架构必须匹配。

    VGG-16 的架构与 models/finetune_flickr_style/train_val.prototxt (FlickrStyleCaffeNet) 描述的模型不同。这是求解器将尝试优化的网络。即使它没有崩溃,您加载的权重在新网络中也没有任何意义。

    Caffe 模型动物园this 页面上的 deploy.prototxt 文件中描述了 VGG-16 网络。

    【讨论】:

    • VGG 有 train_val.prototxt 和 solver.protxt 吗?除了你链接中描述的那个,我找不到一个,人们说它不起作用。
    • 还没有遇到 VGG-16 的 train_val。查看karpathy'strain_val,prototxt 似乎有些过时了。你最终会得到在训练期间不会改变的零权重。您需要在整个网络中添加初始化参数。一个简单的选项类似于 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } 但我建议查看 VGG-16 论文,了解作者使用了哪些初始化。
    猜你喜欢
    • 2016-09-24
    • 2019-06-16
    • 1970-01-01
    • 2018-11-26
    • 2023-04-04
    • 2017-04-30
    • 1970-01-01
    • 1970-01-01
    • 2017-08-27
    相关资源
    最近更新 更多