运行Caffe时遇到“检查故障堆栈跟踪:”

时间:2016-08-31 02:38:46

标签: python stack trace caffe

我使用python(IDE是Pycharm)运行网络和预训练模型来获得8个输出。代码是这样的:

myNet = root + netName
myModel = root + modelName
net = caffe.Net(myNet , myModel , caffe.TEST)

网络非常简单:

name: "Trial"
layer {
    name: "data"
    type: "MemoryData"
    top: "imgPairsSubMean"
    top: "boundings" 
    memory_data_param {
        batch_size: 1
        channels: 2
        height: 64
        width: 64
      }
    include {
        phase: TEST
    }
}

layer {
    name: "conv1"
    type: "Convolution"
    bottom: "imgPairsSubMean"
    top: "conv1"
    param {
        lr_mult: 1
    }
    param {
        lr_mult: 2
    }
    convolution_param {
        num_output: 1
        pad: 1
        kernel_size: 3
        stride: 1
        weight_filler {
            type: "xavier"
            std: 0.01
        }
        bias_filler {
            type: "constant"
            value: 0
        }
    }
}
layer {
    name: "relu1"
    type: "ReLU"
    bottom: "conv1"
    top: "conv1"
}
layer {
    name: "pool1"
    type: "Pooling"
    bottom: "conv1"
    top: "pool1"
    pooling_param {
        pool: MAX
        kernel_size: 2
        stride: 2
    }
}
layer {
    name: "ip1"
    type: "InnerProduct"
    bottom: "pool1"
    top: "ip1"
    param {
        lr_mult: 1
    }
    param {
        lr_mult: 2
    }
    inner_product_param {
        num_output: 8
        weight_filler {
            type: "gaussian"
            std: 0.005
        }
        bias_filler {
            type: "constant"
            value: 0
        }
    }
}

该模型由我自己训练。使用的数据大小为70000 * 2 * 64 * 64。 网络只能通过试验来测试为什么我总是会收到这样的错误。

I0830 18:49:22.437019 10536 layer_factory.hpp:77] Creating layer data
I0830 18:49:22.437019 10536 net.cpp:91] Creating Layer data
I0830 18:49:22.437019 10536 net.cpp:399] data -> imgPairsSubMean
I0830 18:49:22.437019 10536 net.cpp:399] data -> boundings
I0830 18:49:22.437019 10536 net.cpp:141] Setting up data
I0830 18:49:22.437019 10536 net.cpp:148] Top shape: 1 2 64 64 (8192)
I0830 18:49:22.437019 10536 net.cpp:148] Top shape: 1 (1)
I0830 18:49:22.437019 10536 net.cpp:156] Memory required for data: 32772
I0830 18:49:22.437019 10536 layer_factory.hpp:77] Creating layer conv1
......
I0830 18:49:22.681442 10536 net.cpp:425] ip1 <- pool1
I0830 18:49:22.681442 10536 net.cpp:399] ip1 -> ip1
I0830 18:49:22.681442 10536 net.cpp:141] Setting up ip1
I0830 18:49:22.681442 10536 net.cpp:148] Top shape: 1 8 (8)
I0830 18:49:22.681442 10536 net.cpp:156] Memory required for data: 69668
I0830 18:49:22.681442 10536 net.cpp:219] ip3 does not need backward computation.
I0830 18:49:22.681442 10536 net.cpp:219] pool1 does not need backward computation.
I0830 18:49:22.681442 10536 net.cpp:219] relu1 does not need backward computation.
I0830 18:4***Check failure stack trace***   
Process finished with exit code -1073740791 (0xC0000409)

请注意最后两行

我曾经认为它可能是Pycharm的内存限制,所以我更改了.vmoptions文件,没有用;我将数据类型从“MemoryData”更改为“Input”,没有运气。

那么,任何人都可以暗示这里发生了什么吗?我该怎么做才能摆脱它?非常感谢你!

0 个答案:

没有答案