Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fusing different input channels in caffe?

Tags:

caffe

I'd like to process different types of data seperately first and then fuse them in a common layer. Is this possible in Caffe and if yes what would be the best way to do it?

I've read that one can define several data layers in the same prototxt file. But how to fuse them?

Can I just create a InnerProduct layer and specify several bottom layers? Or do I have to concatenate the individual layers first using a Concat layer?

For any small code example I would be very thankful!

like image 386
mcExchange Avatar asked Sep 22 '15 12:09

mcExchange


1 Answers

As discussed in the comments above, InnerProduct works with a single input. The fusion (concatenation) can then be done in a specific Concat layer with a configuration like this:

layer {
  name: "concat"
  bottom: "in1"
  bottom: "in2"
  top: "out"
  type: "Concat"
  concat_param {
    axis: 1
  }
}

The official documentation has more details about that layer: http://caffe.berkeleyvision.org/tutorial/layers.html

like image 190
Mikael Rousson Avatar answered Oct 31 '22 14:10

Mikael Rousson