VGG16转学习

时间:2017-04-18 13:27:20

标签: deep-learning

当我尝试实施转移学习来训练我的ConvNet模型时,在Keras博客(goo.gl/N60H13)中有一段我不理解的代码片段。总的来说,VGG16有21层,但为了冻结除最终FC之外的所有其他层,我需要冻结的层数为20.有没有人理解为什么博客使它成为24层([: 25])?

代码:

for layer in model.layers[:25]:
    layer.trainable = False

2 个答案:

答案 0 :(得分:1)

layer.trainable = False 用于机器学习中的转移学习概念。为此,我们冻结了24层,并保持输出层不冻结,因此我们可以在其上训练自己的网络。

简单地回答,最后一层是输出层。我们不想冻结它。

答案 1 :(得分:0)

也许它与Kera的框架有关。

gist开始,我们知道 $('#myCarousel').carousel({ interval: false }); var totalItems = $('.item').length; if (totalItems > 3) { //alert(); $('.carousel .item').each(function() { var next = $(this).next(); if (!next.length) { next = $(this).siblings(':first'); } next.children(':first-child').clone().appendTo($(this)); if (next.next().length > 0) { next.next().children(':first-child').clone().appendTo($(this)).addClass('rightest'); } else { $(this).siblings(':first').children(':first-child').clone().appendTo($(this)); } }); } else { //what to be here } 因此,它最初也会计入VGG16 model for Keras has been obtained by directly converting the Caffe model.。使用revision history进行双重检查,确实包含zero-padding layers

对于来自Kera的当前版本的VGG16,也许它应该是

zero-padding layers