Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward 时闪退,即使整个网络只有一层卷积 #148

Closed
daquexian opened this issue Sep 24, 2017 · 1 comment
Closed

Forward 时闪退,即使整个网络只有一层卷积 #148

daquexian opened this issue Sep 24, 2017 · 1 comment

Comments

@daquexian
Copy link
Contributor

daquexian commented Sep 24, 2017

使用自己的网络,报错信息(Android 平台):
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 7407 (ent.squeezencnn)

错误是 Extractorextract 引发的。即使把 prototxt 里的所有层全砍掉只留下一层卷积,还是会报同样的错误。

将 data blob 的数据取出来看了一下,数据是正常的。

有没有大大知道这是怎么回事0。0 十分感谢!


我使用的 prototxt:

layer {
  name: "data"
  type: "Input"
  top: "data"
  input_param { shape: { dim: 1 dim: 3 dim: 227 dim: 227 } }
}
layer {
  name: "conv1_1/conv"
  type: "Convolution"
  bottom: "data"
  top: "conv1_1/conv"
  convolution_param {
    num_output: 16
    bias_term: false
    pad: 3
    kernel_size: 7
  }
}

caffemodel 是由这个 prototxt 生成的。


我使用的命令:

./caffe2ncnn X.prototxt X.caffemodel Y.param Y.bin
./ncnn2mem Y.param Y.bin Y.id.h Y.mem.h

然后把 Y.param.bin 复制到 assets 目录,Y.id.h 复制到 jni 目录。app 正常编译,load_param 和 load_model 的返回值都正常。data blob 的数据也正常,但执行 extract 的提取 conv1_1/conv 的 feature
时候直接闪退,报 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 7407 (ent.squeezencnn)

@daquexian
Copy link
Contributor Author

解决了,是窝脑残了,我应该先 load_param 再 load_model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant