我有一个像1x8x128x128一样的5D blob,还有一个卷积层,它可以处理我的5D blob。当我想使用池层时,尽管它不起作用。如何使用带有5D blob的pool-layer?
检查失败:4 ==底部->num_ axes () (4 vs.5)输入必须有4个轴,对应于(num,通道,高度,宽度)
我认为这还没有得到首席执行官的支持。我可以用卷积层做pooling吗?
发布于 2016-11-30 13:10:10
如果您只想集中前两个空间维度,可以将"Reshape"到4D (“压缩”通道和时间维度),池然后"Reshape"返回到5D:
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.
}有关详细信息,请参阅ReshapeParameter在caffe.proto中的定义。
https://stackoverflow.com/questions/40888514
复制相似问题