caffe:无法更改池化层的填充大小

caffe: can not change pad size of pooling layer

当更改 pas 大小时,出现此错误。我尝试了不同尺寸的焊盘,但出现了类似的错误。这里有更多详细信息:

    layer {
  name: "Pooling1"
  type: "Pooling"
  bottom: "Convolution2"
  top: "Pooling1"
  pooling_param {
    pool: MAX
    kernel_h: 1
    kernel_w: 2
    stride_h: 1
    stride_w: 2
    pad_h: 0
    pad_w: 3
  }

这是错误:

...
Creating layer Convolution2
I0525 10:45:37.403520 20575 net.cpp:84] Creating Layer Convolution2
I0525 10:45:37.403524 20575 net.cpp:406] Convolution2 <- Concat1
I0525 10:45:37.403529 20575 net.cpp:380] Convolution2 -> Convolution2
I0525 10:45:37.403555 20575 net.cpp:122] Setting up Convolution2
I0525 10:45:37.403560 20575 net.cpp:129] Top shape: 1 16 1 4076 (65216)
I0525 10:45:37.403563 20575 net.cpp:137] Memory required for data: 3022080
I0525 10:45:37.403568 20575 layer_factory.hpp:77] Creating layer Pooling1
I0525 10:45:37.403571 20575 net.cpp:84] Creating Layer Pooling1
I0525 10:45:37.403575 20575 net.cpp:406] Pooling1 <- Convolution2
I0525 10:45:37.403581 20575 net.cpp:380] Pooling1 -> Pooling1
F0525 10:45:37.403594 20575 pooling_layer.cpp:74] Check failed: pad_w_ < kernel_w_ (3 vs. 2)

提前致谢!

从您收到的错误消息中可以清楚地看出问题:您将 pad 设置为大于池内核大小。减少垫子,你应该没问题