【问题标题】:How to concat the output of a pooling layer and inner-product layer in CAFFE?如何在 CAFFE 中连接池化层和内积层的输出?
【发布时间】:2015-12-04 12:48:55
【问题描述】:

在尝试将池化层(池化卷积层)的输出与内积层的输出连接时,出现以下错误:

Check failed: num_axes == bottom[i]->num_axes() (4 vs. 2) All inputs must have the same #axes.

我想连接两者并将它们输入另一个(全连接)内积层。

谁能建议如何解决这个问题?

我的 concat 层定义是:

layer {
  type: "Concat"
  bottom: "pool3"
  bottom: "ip1_prior"
  top: "ip1_combine"
  name: "concat"
}

谢谢!

【问题讨论】:

    标签: deep-learning caffe


    【解决方案1】:

    通过展平转化解决了我的问题。层输出。

    例如通过在池层和连接层之间添加一个 Flatten 层:

    layer {
      type: "Flatten"
      bottom: "pool3"
      top: "pool3flat"
      name: "p3flat"
    }
    
    layer {
      type: "Concat"
      bottom: "pool3flat"
      bottom: "ip1_prior"
      top: "ip1_combine"
      name: "concat"
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-07
      • 2017-04-02
      • 2018-11-21
      • 1970-01-01
      • 2016-10-09
      • 1970-01-01
      • 2018-08-04
      • 1970-01-01
      相关资源
      最近更新 更多