如何在 CAFFE 中合并池化层和内积层的输出?
How to concat the output of a pooling layer and inner-product layer in CAFFE?
在尝试将池化层(池化卷积层)的输出与内积层的输出相连接时,出现以下错误:
Check failed: num_axes == bottom[i]->num_axes() (4 vs. 2) All inputs must have the same #axes.
我想连接两者并将它们送入另一个(完全连接的)内积层。
任何人都可以建议如何解决这个问题吗?
我的连接层定义是:
layer {
type: "Concat"
bottom: "pool3"
bottom: "ip1_prior"
top: "ip1_combine"
name: "concat"
}
谢谢!
通过展平转化率解决了我的问题。图层输出。
例如通过在 pool 层和 concat 层之间添加 Flatten 层:
layer {
type: "Flatten"
bottom: "pool3"
top: "pool3flat"
name: "p3flat"
}
layer {
type: "Concat"
bottom: "pool3flat"
bottom: "ip1_prior"
top: "ip1_combine"
name: "concat"
}
在尝试将池化层(池化卷积层)的输出与内积层的输出相连接时,出现以下错误:
Check failed: num_axes == bottom[i]->num_axes() (4 vs. 2) All inputs must have the same #axes.
我想连接两者并将它们送入另一个(完全连接的)内积层。
任何人都可以建议如何解决这个问题吗?
我的连接层定义是:
layer {
type: "Concat"
bottom: "pool3"
bottom: "ip1_prior"
top: "ip1_combine"
name: "concat"
}
谢谢!
通过展平转化率解决了我的问题。图层输出。
例如通过在 pool 层和 concat 层之间添加 Flatten 层:
layer {
type: "Flatten"
bottom: "pool3"
top: "pool3flat"
name: "p3flat"
}
layer {
type: "Concat"
bottom: "pool3flat"
bottom: "ip1_prior"
top: "ip1_combine"
name: "concat"
}