二进制格式的模型运行报错
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 23.8k
- Forks
- 4.5k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 37
Description
采用ncnn2mem格式的二进制格式模型进行推理时报错,部分代码如下:
include “net.id.h”
include “net.mem.h”
ncnn::net net;
net.load_param(net_param_bin);
net.load_model(net_bin);
ncnn::Extractor ex = net.create_extractor();
ex.input(net_param_id::BLOB_data, in);
ex.extract(net_param_id::BLOB_prob, out);
在执行到extract时候会报Segmentation fault (core dumped)
received signal SIGSEGV, Segmentation fault.
0x00007ffff775c0f0 in ncnn::conv3x3s1_sse(ncnn::Mat const&, ncnn::Mat&, ncnn::Mat const&, ncnn::Mat const&, ncnn::Option const&) [clone ._omp_fn.20] ()
PS:模型是自己fine-tune过的,用普通格式加载运行没问题,转换成二进制后就报错
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the shown ncnn::net loading and Extractor calls, comparing the ncnn2mem binary model with the ordinary-format model that works. Inspect the generated net.id.h, net.mem.h, net_param_bin, and net_bin in relation to the conv3x3s1_sse crash; done means binary-model extraction completes without the segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100