PaddlePaddle / Anakin

High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
https://anakin.baidu.com/
Apache License 2.0
532 stars 135 forks source link

Error while runtime ! Target attr name(weight_2) not found #344

Open dancingpipi opened 6 years ago

dancingpipi commented 6 years ago

I have converted the Mobilenet-SSD caffemodel to anakin model, it generated a file named mobilenet_ssd.anakin.bin. Then I use the example example_nv_cnn_net.cpp to test my bin file, but I got the error: `0| 11:20:33.00349| 0.436s| 1F5B7040| cuda_device.cpp:45] Device id: 0 , name: Quadro K1200

0| 11:20:33.00349| 0.436s| 1F5B7040| cuda_device.cpp:47] Multiprocessors: 4

0| 11:20:33.00349| 0.436s| 1F5B7040| cuda_device.cpp:50] frequency:1032MHz

0| 11:20:33.00349| 0.436s| 1F5B7040| cuda_device.cpp:52] CUDA Capability : 5.0

0| 11:20:33.00349| 0.436s| 1F5B7040| cuda_device.cpp:54] total global memory: 4041MBytes.

0| 11:20:33.00350| 0.437s| 1F5B7040| cuda_device.cpp:45] Device id: 1 , name: Quadro K1200

0| 11:20:33.00350| 0.437s| 1F5B7040| cuda_device.cpp:47] Multiprocessors: 4

0| 11:20:33.00350| 0.437s| 1F5B7040| cuda_device.cpp:50] frequency:1032MHz

0| 11:20:33.00350| 0.437s| 1F5B7040| cuda_device.cpp:52] CUDA Capability : 5.0

0| 11:20:33.00350| 0.437s| 1F5B7040| cuda_device.cpp:54] total global memory: 4041MBytes.

WAN| 11:20:33.00529| 0.617s| 1F5B7040| net.cpp:665] Current used device id : 0

WAN| 11:20:33.00532| 0.619s| 1F5B7040| input.cpp:16] Parsing Input op parameter.

0| 11:20:33.00532| 0.619s| 1F5B7040| input.cpp:19] |-- shape [0]: 1

0| 11:20:33.00532| 0.619s| 1F5B7040| input.cpp:19] |-- shape [1]: 3

0| 11:20:33.00532| 0.619s| 1F5B7040| input.cpp:19] |-- shape [2]: 300

0| 11:20:33.00532| 0.619s| 1F5B7040| input.cpp:19] |-- shape [3]: 300

FTL| 11:20:33.00532| 0.619s| 1F5B7040| node.h:180] Target attr name(weight_2) not found.

fatal error stack trace: :

6 0x4115d9 ./a.out() [0x4115d9]

5 0x7ff054ca2b45 __libc_start_main + 245

4 0x411cdf ./a.out() [0x411cdf]

3 0x7ff055c633fc anakin::Net<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0, (anakin::OpRunType)1>::Net(anakin::graph::Graph<anakin::saber::TargetType<(anakin::saber::TargetTypeE num)1>, (anakin::saber::DataType)1, (anakin::Precision)0>&, bool) + 172

2 0x7ff055c626ca anakin::Net<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>,(anakin::saber::DataType)1, (anakin::Precision)0,(anakin::OpRunType)1>::init(anakin::graph::Graph<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>&) + 1034

1 0x7ff055dca3d0 anakin::ops::SassConvReluHelper<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>::InitParam() + 752

0 0x7ff055c62296 anakin::PBlock<float, anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1> > anakin::graph::Node<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>::get_attr<anakin::PBlock<float, anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1> > >(std::string&) + 182 Aborted`

what is the wrong? I can't understand the error information.

LittleMaer commented 6 years ago

I think you should change CMakeLists.txt file, line 86 "set(TARGET_GPUARCH 6.1)" to "set(TARGET_GPUARCH 5.0)".

wzzju commented 6 years ago

hi, how do you convert the Mobilenet-SSD caffemodel to anakin model? I do the same thing, but it shows the following error:

Anakin/tools/external_converter_v2/parser/caffe/caffe_layer_param_transmit.py", line 1081, in Parser_priorbox
    OpsRegister()["PriorBox"].fixed_size = list(prior_box_param.fixed_size)
AttributeError: 'PriorBoxParameter' object has no attribute 'fixed_size'

Can you send your converted anakin mobilenet-ssd model to me? My email is 2298507608 AT qq.com.