Caffe中的多个预训练网络 [英] Multiple pretrained networks in Caffe

查看:73
本文介绍了Caffe中的多个预训练网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种简单的方法(例如,无需修改caffe 代码)以将权重从多个预先训练的网络加载到一个网络中?该网络包含一些层,它们的尺寸和名称与这两个预先训练的网络相同。

Is there a simple way (e.g. without modifying caffe code) to load wights from multiple pretrained networks into one network? The network contains some layers with same dimensions and names as both pretrained networks.

我正在尝试使用NVidia DIGITS和Caffe来实现这一点。

I am trying to achieve this using NVidia DIGITS and Caffe.

编辑:我认为不可能直接通过DIGITS进行操作,这一点得到了答案的证实。谁能建议一种简单的方法来修改DIGITS代码以能够选择多个预先训练的网络?我检查了一下代码,并认为培训脚本将是一个不错的起点,但是我对Caffe并不了解,所以我不确定实现此目标的最佳/最快方法是什么。

EDIT: I thought it wouldn't be possible to do it directly from DIGITS, as confirmed by answers. Can anyone suggest a simple way to modify the DIGITS code to be able to select multiple pretrained networks? I checked the code a bit, and thought the training script would be a good place to start, but I don't have in-depth knowledge of Caffe, so I'm not sure what the best/quickest way to achieve this would be.

推荐答案

正如Shai所建议的那样,没有办法这样做,所以我决定克隆官方存储库并进行适当的更改。我更改了代码,以便可以使用冒号作为分隔符来加载多个经过预先训练的网络。

As Shai suggested, there was no way of doing this, so I decided to clone the official repository and make the appropriate changes. I changed the code so that multiple pretrained networks can be loaded by using a colon as separator.

我在官方存储库上创建了请求请求,然后将我的更改与是DIGITS的主要分支,这意味着现在可以在DIGITS中使用此功能。

I created a pull request on the official repository and my changes were then merged with the main branch of DIGITS, meaning it is now possible to use this functionality in DIGITS.

这篇关于Caffe中的多个预训练网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆