I encountered a problem when try to convert the MXNet model to Caffe model. I find a nodes operation in MXNet that defined as "op"="mean", which seems not been perfectly supported in Caffe.
MXNet Node:
{
"op": "mean",
"name": "mean0",
"attr": {
"axis": "(2, 3)",
"keepdims": "True"
},
"inputs": [[781, 0, 0]]
},
According to https://mxnet.incubator.apache.org/api/python/symbol/symbol.html?highlight=mean#mxnet.symbol.mean
This node calculates the mean value separately on the axes2 and axes[3], and retain the same dimension size of input.
I find a layer in Caffe named "Reduction Layer" as http://caffe.berkeleyvision.org/tutorial/layers/reduction.html which seems doesn't support the mean operation.
Since my target is pretty simple, calculate the mean value on axe2 and [3] and return a full dimension sized tensor, I'm not sure whether there is a way to realize this based on the existing Caffe layers.
For example, I considered to use Convolution Layer in Caffe by setting kernel size=1, output=1, weight=1 to realize the average calculation, but how to define the calculation only happened on specific axes?
Any idea is welcome.
Thanks, Colin