How to reshape the weights of an Inner_product layer in Caffe?

39 views
Skip to first unread message

Tong Shen

unread,
Feb 4, 2016, 2:15:13 AM2/4/16
to Caffe Users
I want to change a fully connected layer to a fully convolutional layer. But Caffe stores the fully connected layer info into a matrix like for example 4*12*1*1. How to reshape it to like 4*3*2*2, where 4 is still for the number of filers, 3 is for the channels, and 2*2 is the filter size. I just want to know how Caffe reshape the data and then I will be able to reshape it back in the right order. Since I am just a newbie to Caffe, C++ source code is a bit hard for me. Could someone give me some hint? Thanks a lot.
Reply all
Reply to author
Forward
0 new messages