How to use custom matrices to initial weights matrices in caffe?

340 views
Skip to first unread message

kklots

unread,
Dec 9, 2014, 10:07:36 AM12/9/14
to caffe...@googlegroups.com
Hi, everybody,
i have trained some filters by other method (not neural network), now i want to use those filters as the weights matrices to initial the first layer in caffe, how can i put those data into caffe ? thx.

Evan Shelhamer

unread,
Dec 9, 2014, 11:06:22 AM12/9/14
to kklots, caffe...@googlegroups.com
Load the network definition and your custom weights in Python, assign the weights to the first layer, and then save the network. Fine-tune from this network. See the net surgery example: http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/net_surgery.ipynb

Evan Shelhamer

On Tue, Dec 9, 2014 at 10:07 AM, kklots <kkl...@gmail.com> wrote:
Hi, everybody,
i have trained some filters by other method (not neural network), now i want to use those filters as the weights matrices to initial the first layer in caffe, how can i put those data into caffe ? thx.

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/b376013f-eb65-4285-9129-d23f522ddb38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kklots

unread,
Dec 9, 2014, 8:46:54 PM12/9/14
to caffe...@googlegroups.com, kkl...@gmail.com, shel...@eecs.berkeley.edu
Thanks for your advice, i will read this code carefully. i noticed that this example is implemented by using pycaffe model's functions, i wonder whether matcaffe model can provide similar functions, because i'm more familiar with matlab than python. thanks.

在 2014年12月10日星期三UTC+8上午12时06分22秒,Evan Shelhamer写道:
Reply all
Reply to author
Forward
0 new messages