Bharat
Bharat

Reputation: 2179

Matrix multiplication between two feature maps in Caffe

Is there a layer (or a simple combination of layers) which can be used to perform matrix multiplication between two feature maps? For example, say there is a blob is of size MxN and another one of size NxP, is there a layer which can multiply these two blobs like a matrix?

Upvotes: 1

Views: 1068

Answers (1)

Shai
Shai

Reputation: 114866

There is a planned change to caffe to allow for manipulations as you ask, that is, treating parameter blobs as regular blobs. See this answer for more information.

Until this change is complete, you might consider

  1. "Tile"ing the blobs into MxNxP blobs.
  2. Using "Eltwise" layer for element-wise multiplication.
  3. Using "Pooling" with global pool on the N axis.

Upvotes: 1

Related Questions