How to implement Three matrices multiplication in Caffe

41 views
Skip to first unread message

Comma

unread,
Sep 16, 2015, 7:54:12 PM9/16/15
to Caffe Users
Hi, I have three matrices-A, B, C, I need to multiple them together as "ABC".

I know in Caffe, we have "caffe_cpu_gemm" which call "cblas_?gemm" to do the computation. But this function only can handle TWO matrices (A*B) situtation. 

So, if I want to compute Three or more matrices, I need to use a temporary matrix to hold the first (A*B) result then call "caffe_cpu_gemm" again to compute (A*B*C). 

But I am wondering whether there is a new function that can compute three or more matrices multiplication without a temporary variable to hold the intermediate results?


Reply all
Reply to author
Forward
0 new messages