c/c++开发者
caffe-ssd300算法移植
BMNETC是针对caffe的模型编译器,可将某网络的caffemodel和prototxt编译成BMRuntime 所需要的文件。而且在编译的同时,支持每一层的NPU模型计算结果都会和CPU的计算结果进行对比,保证正确性。Caffe模型转换的主要操作工具介绍如下:
Command name: bmnetc - BMNet compiler command for Caffe mode
/path/to/bmnetc [--model=<path>] \
[--weight=<path>] \
[--shapes=<string>] \
[--net_name=<name>] \
[--opt=<value>] \
[--dyn=<bool>] \
[--outdir=<path>] \
[--target=<name>] \
[--cmp=<bool>] \
[--mode=<string>] \
[--enable_profile=<bool>] \
[--show_args] \
[--check_model]args
type
Description
model
string
Necessary. Caffe prototxt path
weight
string
Necessary. Caffemodel(weight) path
shapes
string
Optional. Shapes of all inputs, default use the shape in prototxt, format [x,x,x,x],[x,x]…, these correspond to inputs one by one in sequence
net_name
string
Optional. Name of the network, default use the name in prototxt
opt
int
Optional. Optimization level. Option: 0, 1, 2, default 2.
dyn
bool
Optional. Use dynamic compilation, default false.
outdir
string
Necessary. Output directory
target
string
Necessary. Option: BM1682, BM1684; default: BM1682
cmp
bool
Optional.Check result during compilation. Default: true
mode
string
Optional. Set bmnetc mode. Option: compile, GenUmodel. Default: compile.
enable_profile
bool
Optional. Enable profile log. Default: false
show_args
Optional. Display arguments passed to bmnetc compiler.
check_model
Optional. Check unsupported layer types from input model.
下载SSD模型
使用Sophon complier编译模型
加载Sophon bmodel
数据预处理
执行Sophon Model推理
数据后处理
实例演示
Last updated
Was this helpful?