easiest way to add new nodes in one layer

70 views
Skip to first unread message

Zheng Shou

unread,
Feb 15, 2015, 12:02:45 AM2/15/15
to caffe...@googlegroups.com
Hi Folks,

Recently I am considering which may be the easiest way to implement the following task in Caffe: For a trained network, let's say for one particular layer, it has 100 nodes; now I want to add one extra new node to this layer with random weights initialization for this new node but keep weights of that 100 old nodes;  and then do training with 101 nodes. 

It looks like if I change the number of nodes in one layer, I should re-define the net prototxt file; but if so, weights for all 101 nodes are all randomly initialized. I am thinking about besides re-define #nodes in the layer in the net prototxt file, I may could save old trained network into matlab and add extra weights for that new node, and then load the matlab model while starting a new training task.

I am wondering is there any more easier way to implement this in Caffe? Or may be I'd better use Theano instead? 

Looking forward to hearing your suggestions. Thanks so much!

Many thanks, and Best regards,
Zheng Shou

Evan Shelhamer

unread,
Feb 15, 2015, 12:46:36 PM2/15/15
to Zheng Shou, caffe...@googlegroups.com
See this recent discussion https://groups.google.com/d/msgid/caffe-users/11b7aad4-9f14-4115-a3a5-1c45b3a3b0c8%40googlegroups.com on adding outputs / classes while keeping weights with a code example for Python.

Evan Shelhamer

--
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/4aa3143e-e3e0-4cd4-81d1-daea1a114139%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zheng Shou

unread,
Feb 15, 2015, 1:45:04 PM2/15/15
to Evan Shelhamer, caffe...@googlegroups.com
Got it. Excited about so easy to make it via Python interface. Thanks much! 
Reply all
Reply to author
Forward
0 new messages