caffe:5D blob汇集?

时间:2016-11-30 12:34:32

标签: machine-learning neural-network deep-learning caffe conv-neural-network

我有一个类似1x8x128x128的5D blob,我有一个能够处理我的5D blob的Convolution层。当我想使用池层虽然它不起作用。你如何使用带有5D blob的pool-layer

  

检查失败:4 == bottom [0] - > num_axes()(4 vs. 5)输入必须有4   轴,对应于(数字,通道,高度,宽度)

我认为caffe还没有支持它。我可以使用卷积层并执行pooling吗?

1 个答案:

答案 0 :(得分:2)

如果您只想汇集前两个空间维度,可以"Reshape"到4D(&#34;压缩&#34;频道和时间维度),池,然后layer { name: "pool/reshape4D" type: "Reshape" bottom: "in" top: "pool/reshape4D" reshape_param { axis: 1 num_axes: 1 shape { dim: -1 } } } layer { name: "pool" type: "Pooling" bottom: "pool/reshape4D" top: "pool" # pooling params here... } layer { name: "pool/reshape5D" type: "Reshape" bottom: "pool" top: "pool/reshape5D" reshape_param { axis: 1 num_axes: 1 shape { dim: -1 dim: <temporal_dim> } } # replace <.> with the actual temporal dimension size. } 返回图5D:

ReshapeParameter

有关详细信息,请参阅https://api.jquery.com/last-child-selector/params[:title]的定义。