Coder Social home page Coder Social logo

paddlepaddle / anakin Goto Github PK

View Code? Open in Web Editor NEW
529.0 57.0 135.0 25 MB

High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.

Home Page: https://anakin.baidu.com/

License: Apache License 2.0

CMake 1.63% Shell 0.29% C++ 80.65% C 1.90% Cuda 4.95% Python 5.19% JavaScript 5.10% CSS 0.14% HTML 0.13% Dockerfile 0.03%
ai inference-engine arm nvidia amd intel bitmain cambricon high-performance cross-platform

anakin's Introduction

Anakin2.0

Build Status License Coverage Status

Welcome to the Anakin GitHub.

Anakin is a cross-platform, high-performance inference engine, which is originally developed by Baidu engineers and is a large-scale application of industrial products.

Please refer to our release announcement to track the latest feature of Anakin.

Features

  • Flexibility

    Anakin is a cross-platform, high-performance inference engine, supports a wide range of neural network architectures and different hardware platforms. It is easy to run Anakin on GPU / x86 / ARM platform.

    Anakin has integrated with NVIDIA TensorRT and open source this part of integrated API to provide services, developers can call the API directly or modify it as needed, which will be more flexible for development requirements.

  • High performance

    In order to give full play to the performance of hardware, we optimized the forward prediction at different levels.

    • Automatic graph fusion. The goal of all performance optimizations under a given algorithm is to make the ALU as busy as possible. Operator fusion can effectively reduce memory access and keep the ALU busy.

    • Memory reuse. Forward prediction is a one-way calculation. We reuse the memory between the input and output of different operators, thus reducing the overall memory overhead.

    • Assembly level optimization. Saber is a underlying DNN library for Anakin, which is deeply optimized at assembly level.

NV GPU Benchmark

Machine And Enviornment

CPU: Intel(R) Xeon(R) CPU 5117 @ 2.0GHz
GPU: Tesla P4
cuda: CUDA8
cuDNN: v7

  • Time:warmup 10,running 1000 times to get average time
  • Latency (ms) and Memory(MB) of different batch

The counterpart of Anakin is the acknowledged high performance inference engine NVIDIA TensorRT 5 , The models which TensorRT 5 doesn't support we use the custom plugins to support.

VGG16

Batch_Size RT latency FP32(ms) Anakin2 Latency FP32 (ms) RT Memory (MB) Anakin2 Memory (MB)
1 8.52532 8.2387 1090.89 702
2 14.1209 13.8772 1056.02 768.76
4 24.4529 24.3391 1002.17 840.54
8 46.7956 46.3309 1098.98 935.61

Resnet50

Batch_Size RT latency FP32(ms) Anakin2 Latency FP32 (ms) RT Latency INT8 (ms) Anakin2 Latency INT8 (ms) RT Memory FP32(MB) Anakin2 Memory FP32(MB)
1 4.6447 3.0863 1.78892 1.61537 1134.88 311.25
2 6.69187 5.13995 2.71136 2.70022 1108.86 382
4 11.1943 9.20513 4.16771 4.77145 885.96 406.86
8 19.8769 17.1976 6.2798 8.68197 813.84 532.61

Resnet101

Batch_Size RT latency (ms) Anakin2 Latency (ms) RT Latency INT8 (ms) Anakin2 Latency INT8 (ms) RT Memory (MB) Anakin2 Memory (MB)
1 9.98695 5.44947 2.81031 2.74399 1159.16 500.5
2 17.3489 8.85699 4.8641 4.69473 1158.73 492
4 20.6198 16.8214 7.11608 8.45324 1021.68 541.08
8 31.9653 33.5015 11.2403 15.4336 914.49 611.54

X86 CPU Benchmark

Machine And Enviornment

CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz with HT, for FP32 test
CPU: Intel(R) Xeon(R) Gold 6271 CPU @ 2.60GHz with HT, for INT8 test
System: CentOS 6.3 with GCC 4.8.2, for benchmark between Anakin and Intel Caffe

  • All test enable 8 thread parallel
  • Time:warmup 10,running 200 times to get average time

The counterpart of Anakin is Intel Cafe(1.1.6) with mklml.

Net_Name Batch_Size Anakin2 Latency(2650v4) fp32 (ms) caffe Latency(2650v4) fp32 (ms) Anakin2 Latency int8(6271) (ms)
resnet50 1 20.6201 24.1369 3.20866
resnet50 2 39.2286 43.1096 5.44311
resnet50 4 77.1392 81.8814 9.93424
resnet50 8 152.941 158.321 19.5618
vgg16 1 55.6132 70.532 15.3181
vgg16 2 96.5034 131.451 22.5082
vgg16 4 180.479 247.926 37.2974
vgg16 8 346.619 485.44 67.6682
mobilenetv1 1 3.98104 5.42775 0.926546
mobilenetv1 2 7.27079 9.16058 1.35007
mobilenetv1 4 14.4029 16.2505 2.37271
mobilenetv1 8 29.1651 29.8381 3.75992
vgg16_ssd 1 125.948 143.412
vgg16_ssd 2 247.242 266.22
vgg16_ssd 4 488.377 510.978
vgg16_ssd 8 972.762 995.407
mobilenetv2 1 3.78504 23.0066
mobilenetv2 2 7.24622 65.9301
mobilenetv2 4 13.7638 85.3893
mobilenetv2 8 28.4093 131.669

ARM CPU Benchmark

Machine And Enviornment

CPU: Kirin 980
CPU: Snapdragon 652
CPU: Snapdragon 855
CPU: RK3399

  • Compile circumstance: Android ndk cross compile,gcc 4.9,enable neon
  • Time:warmup 10,running 10 times to get average time
  • Note: 1、shufflenetv2 int8 model add swish operator

The counterpart of Anakin is ncnn(20190320). This benchmark we test ARMv7 ARMv8 splitly

ARMv8 TEST

  • ABI: arm64-v8a
  • Latency (ms) of one batch
Kirin 980 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 34.172 19.369 12.723 37.588 20.692 13.280 45.420 24.220 16.730 50.560 27.820 20.010
mobilenet_v2 30.489 17.784 12.327 29.581 17.208 15.307 30.390 17.310 12.900
mobilenet_ssd 71.609 37.477 28.952 88.220 70.070 66.430 103.700 85.160 85.320
resnet50 255.748 137.842 104.628 1299.480 695.830 498.010 243.360 131.100 89.800
shufflenetv1 11.544 8.931 7.027 12.810 9.390 8.030
shufflenetv2 11.687 7.899 5.321 20.402 11.529 9.061
squeezenet 28.580 16.638 14.435
googlenet 93.917 52.742 40.301 130.875 72.522 54.204


Snapdragon 855 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 32.019 19.024 10.491 34.363 20.292 10.382 37.110 22.310 13.520 47.430 28.350 15.830
mobilenet_v2 28.533 17.455 10.433 24.487 15.182 9.133 25.060 15.970 11.250
mobilenet_ssd 66.454 41.397 23.639 101.560 69.380 43.930 136.420 91.010 47.490
resnet50 201.362 132.133 78.300 1141.290 724.090 385.990 229.020 138.450 82.060
shufflenetv1 10.153 7.101 5.327 11.610 8.020 5.870
shufflenetv2 10.868 6.713 4.526 17.306 10.987 6.788
squeezenet 25.880 16.134 9.697
googlenet 85.774 54.518 34.025 118.120 73.686 41.865


Snapdragon 652 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 109.994 54.937 33.174 83.887 43.639 24.665 123.320 122.670 65.100 128.800 154.370 125.570
mobilenet_v2 80.712 46.314 30.874 69.340 43.590 31.864 89.920 90.900 55.320
mobilenet_ssd 246.459 121.684 134.019 248.190 138.170 142.350 247.020 145.080 211.000
resnet50 673.285 346.287 378.065 880.940 514.190 533.760 313.630
shufflenetv1 34.948 26.635 21.571 39.950 25.520 20.180
shufflenetv2 35.530 21.440 16.434 49.498 29.116 19.346
squeezenet 87.037 47.192 28.663
googlenet 268.023 148.533 95.624 236.492 131.510 81.561


RK3399 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 111.317 60.008 87.201 45.693 149.270 91.200 142.790 86.140
mobilenet_v2 105.767 60.899 79.065 53.914 118.530 86.900
mobilenet_ssd 232.923 128.337 268.900 157.860 256.560 149.730
resnet50 671.800 369.386 1029.300 571.230 569.250 344.830
shufflenetv1 38.761 25.971
shufflenetv2 36.220 22.095 51.879 30.351
squeezenet 98.489 54.863
googlenet 274.166 159.429 235.085 133.044

ARMv7 TEST

  • ABI: armveabi-v7a with neon
  • Latency (ms) of one batch
Kirin 980 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 39.051 19.813 14.184 39.026 22.048 14.250 50.240 26.850 20.010 92.900 49.420 37.160
mobilenet_v2 36.052 19.550 14.507 32.656 19.641 15.735 35.890 20.730 18.550
mobilenet_ssd 83.474 44.530 33.116 99.960 53.160 84.360 180.000 91.380 68.140
resnet50 291.478 158.954 129.484 1412.37 766.62 560.760 355.010 189.18 133.410
shufflenetv1 11.909 9.761 7.441 16.030 10.660 8.120
shufflenetv2 11.755 7.983 6.289 21.968 14.111 9.888
squeezenet 30.148 20.908 17.084
googlenet 108.210 65.798 58.630 140.886 79.910 60.693


Snapdragon 855 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 34.015 20.064 11.410 42.222 21.532 11.746 41.150 24.870 18.420 79.180 48.470 24.530
mobilenet_v2 30.742 18.507 11.354 24.628 15.133 9.079 30.060 19.220 15.520
mobilenet_ssd 69.749 44.010 26.000 85.030 62.770 48.940 154.600 138.700 82.140
resnet50 218.581 146.509 92.899 1380.340 996.410 540.660 324.720 261.920 126.270
shufflenetv1 11.032 7.430 5.369 13.390 9.270 6.360
shufflenetv2 11.372 7.120 4.728 19.393 12.278 7.719
squeezenet 27.860 17.538 10.729
googlenet 100.719 69.509 49.021 127.982 83.369 50.275


Snapdragon 652 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread 1 thread 2 thread 4 thread
mobilenet_v1 121.982 63.004 37.325 86.672 45.728 26.354 130.740 140.850 81.810 184.630 192.730 144.740
mobilenet_v2 89.113 50.609 35.291 72.679 45.888 33.887 94.520 101.380 65.570
mobilenet_ssd 236.466 132.293 86.335 270.630 295.520 174.280 350.640 286.420 243.850
resnet50 751.528 405.433 255.699 2762.890 1447.070 883.730 664.180 369.020
shufflenetv1 36.883 23.718 15.144 53.660 33.450 23.330
shufflenetv2 36.933 26.353 20.507 53.243 31.083 21.550
squeezenet 92.748 51.936 33.027
googlenet 296.092 179.542 125.509 242.505 140.083 89.646


RK3399 Anakin fp32 Anakin int8 NCNN fp32 NCNN int8
1 thread 2 thread 1 thread 2 thread 1 thread 2 thread 1 thread 2 thread
mobilenet_v1 116.981 65.033 87.768 47.617 155.830 98.520 201.800 116.440
mobilenet_v2 118.229 70.567 83.790 55.413 126.530 90.930
mobilenet_ssd 237.196 134.508 292.130 183.650 361.570 200.370
resnet50 725.582 413.995 2883.120 1632.800 702.660 404.970
shufflenetv1 41.094 27.353
shufflenetv2 37.660 23.489 53.558 32.122
squeezenet 104.519 59.402
googlenet 305.304 190.897 244.855 142.493

Documentation

All you need is in Doc Index

We also provide English and Chinese tutorial documentation.

Ask Questions

You are welcome to submit questions and bug reports as Github Issues.

Copyright and License

Anakin is provided under the Apache-2.0 license.

Acknowledgement

Anakin refers to the following projects:

anakin's People

Contributors

chenjiaoangel avatar cyj1986 avatar jayoprell avatar littlemaer avatar mengkai94 avatar pangge avatar qq332982511 avatar shixiaowei02 avatar throneclay avatar uraj avatar wgy0804 avatar xklnono avatar xyoungli avatar yiicy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anakin's Issues

TensorRT MobileNet benchmark results

I am curious about how you implement depthwise plugin layer in TRT by yourselves? The MobileNet v1, v2 test results do not make sense to me. Why so little latency difference between batchsize=1 and 2?

load saved model failed

WAN| 08:46:02.00618| 6.902s| main_thread| parser.cpp:138] Parsing in edges of node : relu5_4
FTL| 08:46:02.00618| 6.902s| main_thread| graph_base.inl:57] Check failed: (this->has_vertex(arc.bottom()) && this->has_vertex(arc.top())) The arc's top or bottom is not vertex!
*** Check failed: (this->has_vertex(arc.bottom()) && this->has_vertex(arc.top())) fatal error: stack trace: ***
6 0x4a3329 ./anakin_demo() [0x4a3329]
5 0x7febe6ff2830 __libc_start_main + 240 [??:0]
4 0x4a420b ./anakin_demo() [0x4a420b]
3 0x7febe8878e96 anakin::graph::Graph<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>::load(std::string) + 202 [??:0]
2 0x7febe877e99a anakin::Status anakin::parser::load<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>(anakin::graph::Graph<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>, std::string&) + 69 [??:0]
1 0x7febe877f4d2 anakin::Status anakin::parser::load<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>(anakin::graph::Graph<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0>
, char const*) + 2656 [??:0]
0 0x4e5cbd anakin::graph::GraphBase<std::string, std::shared_ptr<anakin::graph::Node<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, (anakin::Precision)0> >, anakin::saber::Tensor<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1, anakin::saber::NCHW>*, anakin::graph::Edge<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1> >::add_in_arc(anakin::graph::Edge<anakin::saber::TargetType<(anakin::saber::TargetTypeEnum)1>, (anakin::saber::DataType)1>&) + 451 [??:?]

How to run in ios deveces?

Hello, I want to benchmark Anakin in ios device. But, I can't find relate informataion in Anakin's wiki page. Do you have verified Anakin in ios devices? Thanks.

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

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.

Dose libanakin_saber_sass_sm_61.a support fp16?

@Superjomn Hi, I just want to compare the performance of anakin_sass with the performance of [email protected] for convolution operator, and I have successfully compared on fp32 data-format.
However, when I tried fp16 data-format, I encountered that error of undefined reference to `void anakin::saber::direct_conv_bias_Kdivis4<__half, __half>, does libanakin_saber_sass_sm_61.a support fp16 data-format?

Anakin docker build error on ubuntu 16.04 for Nvidia-GPU

I followed the anakin docker guide guide.

and issue the command

sudo ./anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Ubuntu -m Build

error occur:

-- cudnn include header is CUDNN_INCLUDE_DIR-NOTFOUND/cudnn.h
-- cudnn library is /usr/lib/x86_64-linux-gnu/libcudnn.so/libcudnn.so
CMake Error at cmake/cuda.cmake:126 (message):
  Could not find cudnn library in:
Call Stack (most recent call first):
  cmake/gather.cmake:16 (anakin_find_cudnn)
  CMakeLists.txt:178 (include)


-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "7.5") 
-- Building fat-bin for cuda code !
--  `--support arch :  3.5
--  `--support arch :  5.0
--  `--support arch :  6.0
--  `--support arch :  6.1
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PROTOBUF: /usr/local/lib/libprotobuf.so  
-- Found protobuf in /usr/local/include
-- 
-- ================================ configuration ==================================
-- General:
--   anakin version            : 0.1.2
--   System                    : Linux
--   C++ compiler              : /usr/bin/c++
--   C flags                   : 
--   CXX flags                 :  -std=c++11 -fPIC -ldl -lrt -W  -pthread    -Wno-unused-variable      -fpermissive  -fdiagnostics-show-option -Wno-undef -Wno-narrowing -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor -Wno-comment -Wno-sign-compare -Wno-ignored-qualifiers -Wno-enum-compare -O3 -DNDEBUG
--   Build type                : Release;FORCE
--   Build cross plantform     : ON
--   Build anakin fp32         : ON
-- 
--   Build shared libs         : YES
--   Build with unit test      : YES
-- 
--   Enable verbose message    : NO
--   Enable noisy warnings     : NO
--   Disable all warnings      : YES
-- 
--   Use local logger          : logger
--   Use google protobuf       : ON
--   Use local Unit test       : aktest
--   USE_OPENCV                : OFF
--   USE_BOOST                 : OFF
--   USE_OPENMP                : 
-- 
-- Cuda:
--   USE_CUDA                  : ON
--     |--CUDA version         : 8.0
--     `--NVCC flags           :   -Xcompiler -fPIC -O3 -std=c++11 --default-stream per-thread -Wno-deprecated-gpu-targets  --generate-code arch=compute_35,code=sm_35  --generate-code arch=compute_50,code=sm_50  --generate-code arch=compute_60,code=sm_60  --generate-code arch=compute_61,code=sm_61 
--   USE_CUBLAS                : ON
--   USE_CURAND                : ON
--   USE_CUFFT                 : ON
--   USE_CUDNN                 : ON
--     `--Cudnn version        : 
-- 
--   USE_OPENCL                : OFF
-- 
--   SELECT_GPU_PLACE          : YES
-- 
--   Configuation path         : /Anakin/gpu_build_sm61/anakin_config.h
-- ================================ End ==================================
-- Configuring incomplete, errors occurred!
See also "/Anakin/gpu_build_sm61/CMakeFiles/CMakeOutput.log".
See also "/Anakin/gpu_build_sm61/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
sha256:694bca37cbee627f47bfc46e71af099147bb61045fddf6ec3abd1beeab69d00d

使用external_converter_v2目录下的converter.py转换caffemodle模型失败

config.yaml

OPTIONS:
    Framework: CAFFE
    SavePath: ./output
    ResultName: ocr
    Config:
        LaunchBoard: ON
        Server:
            ip: 0.0.0.0
            port: 8888
        OptimizedGraph: 
            enable: OFF
            path: ./anakin_optimized/ocr.anakin.bin.saved
    LOGGER:
        LogToPath: ./log/
        WithColor: ON 

TARGET:
    CAFFE:
        # path to proto files
        ProtoPaths:
            - /home/kezunlin/program/caffe/src/caffe/proto/caffe.proto
        PrototxtPath: ./input_model/ocr/ocr.prototxt
        ModelPath: ./input_model/mnist/ocr.caffemodel

run converter and get error output:

$ python converter.py
INF | 2018-09-20 14:02:34.567382 | __init__.py:20 <module>() ]  Import Module: caffe_pb2
INF | 2018-09-20 14:02:34.581084 | parser_caffe.py:470 _Parsing_new() ]   [CAFFE] Parsing ...
Traceback (most recent call last):
  File "converter.py", line 20, in <module>
    graph = Graph(config)
  File "/home/kezunlin/program/anakin/tools/external_converter_v2/parser/graph.py", line 39, in __init__
    self.graph_io = self.parser()
  File "/home/kezunlin/program/anakin/tools/external_converter_v2/parser/caffe/parser_caffe.py", line 34, in __call__
    return self._Parsing_new()
  File "/home/kezunlin/program/anakin/tools/external_converter_v2/parser/caffe/parser_caffe.py", line 471, in _Parsing_new
    self._DetectionArch()
  File "/home/kezunlin/program/anakin/tools/external_converter_v2/parser/caffe/parser_caffe.py", line 41, in _DetectionArch
    self._FilterNet()
  File "/home/kezunlin/program/anakin/tools/external_converter_v2/parser/caffe/parser_caffe.py", line 389, in _FilterNet
    assert layer.name not in filtered_layer_names, " layer_name : %s" % (layer.name)
AssertionError:  layer_name : fusion5

x86_build.s执行error

按照如下步骤进行anakin的安装:
https://github.com/PaddlePaddle/Anakin/blob/developing/docs/Manual/INSTALL_ch.md

环境:
ubuntu18.04
make --version GNU Make 4.1
g++ --version g++ (Ubuntu 7.3.0-16ubuntu3) 7.3.0
cmake --version cmake version 3.10.2
protoc --version libprotoc 3.6.1

执行下面命令时:
$ sh Anakin/tools/x86_build.sh

出现以下error:
/home/Anakin/saber/funcs/impl/x86/saber_gru.h:10:24: error: ‘__m256’ was not declared in this scope
#define SABER_X86_TYPE __m256
^
/home/Anakin/saber/funcs/impl/x86/saber_gru.h:58:38: note: in expansion of macro ‘SABER_X86_TYPE’
int aligned_byte= sizeof(SABER_X86_TYPE);
^~~~~~~~~~~~~~
/home/Anakin/saber/funcs/impl/x86/saber_gru.h:10:24: note: suggested alternative: ‘__modf’
#define SABER_X86_TYPE __m256
^
/home/Anakin/saber/funcs/impl/x86/saber_gru.h:58:38: note: in expansion of macro ‘SABER_X86_TYPE’
int aligned_byte= sizeof(SABER_X86_TYPE);
^~~~~~~~~~~~~~
saber/CMakeFiles/anakin_saber_common.dir/build.make:494: recipe for target 'saber/CMakeFiles/anakin_saber_common.dir/funcs/impl/x86/saber_gru.cpp.o' failed
make[2]: *** [saber/CMakeFiles/anakin_saber_common.dir/funcs/impl/x86/saber_gru.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:140: recipe for target 'saber/CMakeFiles/anakin_saber_common.dir/all' failed
make[1]: *** [saber/CMakeFiles/anakin_saber_common.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

ubuntu build fail

使用ubuntu 16.04 编译报错,gcc版本5.4。报错信息如下:
/usr/include/c++/5/bits/stl_function.h:357:20: error: no match for ‘operator==’ (operand types are ‘const anakin::graph::io’ and ‘const anakin::graph::io’) { return __x == __y; }

convert tool error when convert caffe model

liuhao@umaster:~/OpenSource/Anakin/tools/external_converter_v2$ python converter.py
Traceback (most recent call last):
File "converter.py", line 16, in
from parser import *
File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/init.py", line 8, in
from graph import *
File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/graph.py", line 6, in
from proto import *
File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/init.py", line 5, in
from graph_pb2 import *
File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/graph_pb2.py", line 15, in
import node_pb2 as node__pb2
File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/node_pb2.py", line 15, in
import operator_pb2 as operator__pb2
File "/home/liuhao/OpenSource/Anakin/tools/external_converter_v2/parser/proto/operator_pb2.py", line 22, in
serialized_pb=_b('\n\x0eoperator.proto"e\n\x07OpProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0eis_commutative\x18\x02 \x01(\x08\x12\x0e\n\x06in_num\x18\x03 \x01(\x05\x12\x0f\n\x07out_num\x18\x04 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\tb\x06proto3')
TypeError: new() got an unexpected keyword argument 'serialized_options'

改变输入尺寸

请问有没有例子演示 改变输入的尺寸?
第一次输入{1,3,800,600}
第二次输入{1,3,400,400}
这样改变宽高的
或者
宽高不变改变batchsize?

convert tool failed caffe

download third party labraries when make the project

Before we make the project, it will check the dependences in cmake cmd. After cmake, we make the project. However, it still download some third party libraries from Internet. The downloading behavior should not in makefile.

Support and benchmark for int8

Hi!, I am interested in the Anakin project.

I would like to know if there are any supports & benchmark results for int8? If not, will there be any? thx!

GCC 7.2.0 build request.h error

request.h:30:63: error: cannot call member function ‘const string anakin::type_id::type_info() [with T = void; std::__cxx11::string = std::__cxx11::basic_string]’ without object
const std::string info = anakin::type_id::type_info();

Anakin/framework/core/operator/operator.h:120:67: error: expected primary-expression before ‘>’ token
T get_attr(std::string attr_name) { return _node_p->get_attr(attr_name); }

Wrong calculation in pooling layer. < pooling3x3s2_max >

Function: pooling3x3s2_max ( arm/impl/pooling_arm_impl.cpp )
Layer Definition:
layer {
name: "Pooling1"
type: "Pooling"
bottom: "Convolution3"
top: "Pooling1"
pooling_param {
pool: MAX
kernel_size: 3
stride: 2
}
}
Input dim: 1, 64, 61, 61
Output dim: 1, 64, 30, 30
Input Values:
<0, 0>:0.072792
...
<1, 57>: 0.021526
<1, 58>: 0.021526
<1, 59>: 0.021526
<1, 60>: 0.041485

Output Values:
<0, 27>:0.021526
<0, 28>:0.021526
<0, 29>:0.021526
<1, 0>: 0.072792

I think Output<0, 29> must be 0.041485.
Please check and fix bug asap.

ubuntu 16.04 build fail on gcc 4.8.5

based on ubuntu Dockerfile, and changed gcc version to 4.8.5.
error message as follows.

Linking CXX executable ../../output/unit_test/test_saber_buffer_NV
/usr/bin/ld: ../../output/libanakin.so.2.0.1: undefined reference to symbol 'cudnnGetRNNLinLayerBiasParams'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcudnn.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
test/CMakeFiles/test_TargetWrapper.dir/build.make:93: recipe for target '../output/unit_test/test_TargetWrapper' failed
make[2]: *** [../output/unit_test/test_TargetWrapper] Error 1
CMakeFiles/Makefile2:757: recipe for target 'test/CMakeFiles/test_TargetWrapper.dir/all' failed
make[1]: *** [test/CMakeFiles/test_TargetWrapper.dir/all] Error 2

only debug mode can work

when I complied with release flag, benchmark will exit with segment fault, but debug will be ok

where are the head files?

There is NOT a "Inlcude" folder in Anakin root folder or in the build folder, so it is really diffucult to find the head files.

In the examples, it includes some head files, but I can NOT find them in the root folder and build folder.

#include "utils/logger/logger.h"
#include "graph.h"
#include `"net.h"

Anakin arm branch: run squeezenet_v1.1, result is all zero!!!

Hello, I run Anakin arm branch for benchmark squeezenet_v1.1 and vgg16, but I get a wrong result. Net output is all Zero.  I have verify my code in mobilenet 1.0, I can get the right result. But, with squeezenet_v1.1 and vgg16, some wrong happen.  
I don`t get warning when load net parameter, that mean all operators should been support by Anakin. Log also show "constructs the executer net success". 
I want to know what happen? Do you have verify you code in squeezenet and vgg16?

Thanks !!!

Wrong shape of input tensor.

Thanks for the great library.
I want to run my model on ARM and model was converted successfully.
I follow the arm inference example classification.cpp.
Model loaded successfully and graph.get_outs() returns OK.
But d_tensor_in_p->valid_shape() returns all 0.
I can see the correct shapes on web model dashboard.

Net<ARM, AK_FLOAT, Precision::FP32, OpRunType::SYNC> net_executer(graph, ctx1, true);

//! get in
LOG(INFO) << "get input";
auto d_tensor_in_p = net_executer.get_in("input_0");
auto valid_shape_in = d_tensor_in_p->valid_shape();
for (int i = 0; i < valid_shape_in.size(); i++) {
    LOG(INFO) << "detect input dims[" << i << "]" << valid_shape_in[i];
}

I've used exactly same code from classification.cpp.
Hope to any suggestions.

使用脚本编译Anakin Lite库,直接运行lite_ios_build_armv7/8.sh,出现很多error

In file included from error/usr/include/c++/4.2.1/vector: :65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:Unsupported41 :
architectureIn file included from /usr/include/c++/4.2.1/bits/c++config.h
:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:32:
/usr/include/sys/cdefs.h#error Unsupported architecture:
763: ^2
: error: Unsupported architecture
#error Unsupported architecture
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from supported
/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp:1#error architecture not supported:

In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/context_lite.h ^:
17:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:32:
/usr/include/sys/cdefs.h:763:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/context_lite.h:17:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/buffer_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:32:
/usr/include/sys/cdefs.h:763:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/buffer_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.cpp::11:
:
In file included from In file included from In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/buffer_lite.h/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.h/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_lite.cpp:::18181:
:
:
In file included from In file included from In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/teIn file included from nsor_lite.h/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp:::11918:
:
:
In file included from In file included from In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/context_lite.h/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h/usr/include/c++/4.2.1/memory:::171753:
:
:
In file included from In file included from In file included from /usr/include/c++/4.2.1/vector/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h/usr/include/c++/4.2.1/bits/stl_algobase.h:::651865:
:
:
In file included from In file included from In file included from /usr/include/c++/4.2.1/bits/functexcept.h/usr/include/c++/4.2.1/memory/usr/include/c++/4.2.1/bits/c++config.h:::534141:
:
:
In file included from In file included from In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h/usr/include/c++/4.2.1/bits/c++config.h/usr/include/c++/4.2.1/bits/os_defines.h:::654161:
:
:
In file included from In file included from In file included from /usr/include/c++/4.2.1/bits/os_defines.h/usr/include/c++/4.2.1/bits/c++config.h/usr/include/unistd.h:::416171:
:
:
In file included from In file included from In file included from /usr/include/c++/4.2.1/bits/os_defines.h/usr/include/unistd.h/usr/include/_types.h:::617127:
:
:
In file included from In file included from /usr/include/unistd.h/usr/include/_types.h/usr/include/sys/_types.h:::277155:
:
:In file included from 9/usr/include/sys/_types.h/usr/include/_types.h::: 5527::
9error:/usr/include/sys/_types.h: :55:unknown9error :: type nameunknown error '__int64_t': type
name unknown'__int64_t' type
name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks /
^
typedef __int64_t __darwin_blkcnt_t; /
total blocks /
^typedef __int64_t __darwin_blkcnt_t; /
total blocks */

    ^

:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:71:
In file included from /usr/include/_types.h:27:
/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks /
^
/usr/include/sys/_types.h:56/usr/include/sys/_types.h::956:: 9: error: error: unknown typeunknown nametype '__int32_t'name
'__int32_t'
typedef __int32_t __darwin_blksize_t; /
preferred block size /typedef __int32_t __darwin_blksize_t; / preferred block size */

    ^        ^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
/usr/include/sys/_types.h:/usr/include/sys/_types.h57::579::9 : error: error: unknown unknowntype typename name'__int32_t' '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t /
typedef __int32_t __darwin_dev_t; /
dev_t /
^
^
/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; /
dev_t /
^
/usr/include/sys/_types.h:60:9: error/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
/usr/include/sys/_types.h:56:9: error: unknown /usr/include/sys/_types.htype: : 60:typedef __uint32_t __darwin_gid_t; /
[???] process and gro...9unknown:
type ^errorname
: '__uint32_t'unknown
type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /* [???] process and gro...
typedef __uint32_t __darwin_gid_t; /* [???] process and gro...
^
^
/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
/usr/include/sys/_types.h:61:9: error: unknowntypedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, o...
type ^namename '__int32_t'
'__uint32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size /typedef __uint32_t __darwin_id_t; / [XSI] pid_t, uid_t, o...

    ^        ^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'/usr/include/sys/_types.h
:57:typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bi...9
: ^
error: unknown type name '__int32_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bi...
^
typedef __int32_t __darwin_dev_t; /* dev_t /
^
/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; /
[???] process and gro...
^
/usr/include/sys/_types.h:61:9: error: unknown type/usr/include/sys/_types.h :name61 :'__uint32_t'9:
error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, o...
^
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, o...
^
/usr/include/sys/_types.h:62:9: error: unknown/usr/include/sys/_types.h :type62 :name9 :'__uint64_t'
error: unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bi...
^
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bi...
^
/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach /
^
/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /
Used by mach /
^
/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /
[???] Some file attributes /
^
/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; /
[???] Some file attributes /
^
/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /
^
/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /
Used by mach /
^
/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
/usr/include/sys/_types.h:72:9typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /:
^error
: unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; /
[???] process and gro...
^
/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
/usr/include/sys/_types.h:72:typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes /9
: ^
error: unknown type name '__int32_t'
/usr/include/sys/_types.h:73:9typedef __int32_t __darwin_pid_t; /
[???] process and gro...:
^
error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; /* [???] signal set /
^
/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /
^
/usr/include/sys/_types.h:73:9: error/usr/include/sys/_types.h: :74:9:unknown type errorname: '__uint32_t'unknown
type name '__int32_t'
typedef __uint32_t __darwin_sigset_t; /
[???] signal set /
^
typedef __int32_t __darwin_suseconds_t; /
[???] microseconds /
^
/usr/include/sys/_types.h:68:9: /usr/include/sys/_types.h:72error:: 9: unknown type errorname: unknown '__darwin_natural_t'type
name '__int32_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /
Used by mach /
^
typedef __int32_t __darwin_pid_t; /
[???] process and gro...
^
/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds /
^
/usr/include/sys/_types.h:73:9: /usr/include/sys/_types.herror:: 70:9unknown: type nameerror : '__uint32_t'
unknown type name '__uint16_t'
typedef __uint32_t __darwin_sigset_t; /
[???] signal set /
^
typedef __uint16_t __darwin_mode_t; /
[???] Some file attributes /
^
/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
/usr/include/sys/_types.h:74:9: error: unknowntypedef __uint32_t __darwin_uid_t; /
[???] user IDs /
type /usr/include/sys/_types.h ^name:
71'__int32_t':9
: error: unknown type name '__int64_t'
typedef __int32_t __darwin_suseconds_t; /
[???] microseconds /
^
typedef __int64_t __darwin_off_t; /
[???] Used for file sizes /
^
/usr/include/sys/_types.h:76:9: error: /usr/include/sys/_types.hunknown:75:9: /usr/include/sys/_types.h:72error:: 9: unknown typeerror : name '__uint32_t'unknown
type name '__int32_t'
typedef __uint32_t __darwin_uid_t; /
[???] user IDs /
^
typedef __int32_t __darwin_pid_t; /
[???] process and gro...
^
/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /* [???] user IDs /
^
/usr/include/sys/_types.h:76:9: error: unknown type/usr/include/sys/_types.h :name73 :'__uint32_t'9:
error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /
[???] microseconds /
^
typedef __uint32_t __darwin_sigset_t; /
[???] signal set /
^
/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
/usr/include/sys/_types.h:74:9: error: unknown type nametypedef __uint32_t __darwin_useconds_t; /
[???] microseconds */
'__int32_t' ^

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds /
^
/usr/include/sys/_types.h:75:9: errortype: unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; /
[???] user IDs /
^
name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /
[???] microseconds /
^
/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; /
[???] microseconds /
^
In file included from In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/context_lite.h:17:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:180:
/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name
'__darwin_size_t'; did you mean '__darwin_ino_t'?
typedef __darwin_size_t size_t;
^
/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t; /
[???] Used for inodes /
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:180:
/usr/include/sys/_types/_size_t.h:31:9: error: unknown/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/buffer_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:180:
/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name
'__darwin_size_t'; did you mean '__darwin_ino_t'?
typedef __darwin_size_t size_t;
^
/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t; /
[???] Used for inodes /
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.htype name
'__darwin_size_t'; did you mean '__darwin_ino_t'?
typedef __darwin_size_t size_t;
^
/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here
:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vectortypedef __darwin_ino64_t __darwin_ino_t; /
[???] Used for inodes /:
65:
In file included from ^/usr/include/c++/4.2.1/bits/functexcept.h
:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:180:
/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name
'__darwin_size_t'; did you mean '__darwin_ino_t'?
typedef __darwin_size_t size_t;
^
/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t; /
[???] Used for inodes */
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/buffer_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
In file included from /usr/include/sys/_types/_ssize_t.h:30:
/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
In file included from /usr/include/sys/_types/_ssize_t.h:30:
/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/context_lite.h:17:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
In file included from /usr/include/sys/_types/_ssize_t.h:30:
/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/buffer_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
/usr/include/sys/_types/_ssize_t.h:31:9: error: unknown type name
'__darwin_ssize_t'
typedef __darwin_ssize_t ssize_t;
^
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
In file included from /usr/include/sys/_types/_ssize_t.h:30:
/usr/include/machine/types.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/context_lite.h:17:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/common_lite.h:18:
In file included from /usr/include/c++/4.2.1/memory:53:
In file included from /usr/include/c++/4.2.1/bits/stl_algobase.h:65:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
/usr/include/sys/_types/_ssize_t.h:31:9: error: unknown type name
'__darwin_ssize_t'
typedef __darwin_ssize_t ssize_t;
^
/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_lite.cpp:In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.cpp:1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.h:18:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
/usr/include/sys/_types/_ssize_t.h:31:9: error: unknown type name
'__darwin_ssize_t'
typedef __darwin_ssize_t ssize_t;
^
1:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/tensor_lite.h:19:
In file included from /Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/tools/anakin-lite/../../saber/lite/../../saber/lite/core/shape_lite.h:17:
In file included from /usr/include/c++/4.2.1/vector:65:
In file included from /usr/include/c++/4.2.1/bits/functexcept.h:41:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
In file included from /usr/include/unistd.h:72:
In file included from /usr/include/sys/unistd.h:199:
/usr/include/sys/_types/_ssize_t.h:31:9: error: unknown type name
'__darwin_ssize_t'
typedef __darwin_ssize_t ssize_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/ANAKIN_LITE_OBJS.dir/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/buffer_lite.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
20 errors generated.
20 errors generated.
make[2]: *** [CMakeFiles/ANAKIN_LITE_OBJS.dir/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_op_lite.cpp.o] Error 1
20 errors generated.
make[2]: *** [CMakeFiles/ANAKIN_LITE_OBJS.dir/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/tensor_lite.cpp.o] Error 1
make[2]: *** [CMakeFiles/ANAKIN_LITE_OBJS.dir/Users/v_zhangxiaoqing01/Desktop/新/Anakin-arm_lite/saber/lite/core/context_lite.cpp.o] Error 1
make[1]: *** [CMakeFiles/ANAKIN_LITE_OBJS.dir/all] Error 2
make: *** [all] Error 2

build failed on Centos

make会提示如下错误,直接解开tar包是没问题的,mklml的包也成功下载下来了,多次编译也不能通过

[  1%] Performing download step for 'extern_mklml'
--2018-05-30 21:14:26--  http://paddlepaddledeps.cdn.bcebos.com/mklml_lnx_2018.0.3.20180406.tgz
正在解析主机 paddlepaddledeps.cdn.bcebos.com (paddlepaddledeps.cdn.bcebos.com)... 221.195.34.35
正在连接 paddlepaddledeps.cdn.bcebos.com (paddlepaddledeps.cdn.bcebos.com)|221.195.34.35|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 416 Requested Range Not Satisfiable

    文件已下载完成;不会进行任何操作。

tar: DOWNLOAD_NO_PROGRESS:归档中找不到
tar: 1:归档中找不到
tar: 由于前次错误,将以上次的错误状态退出
make[2]: *** [third-party/mklml/src/extern_mklml-stamp/extern_mklml-download] 错误 2
make[1]: *** [CMakeFiles/extern_mklml.dir/all] 错误 2
make: *** [all] 错误 2

Crash when Optimize Graph?

code here

auto status = graph->load("./output/lenet.anakin.bin");
graph->ResetBatchSize("input_0", batch_size);
graph->Reshape("input_0", {1, 1, 28, 28});
//! optimize the graph
LOG(INFO) << "optimize the graph";
graph->Optimize();

it's crash when run at "graph->Optimize()".

error here:
image

if I comment graph->Optimize() ,there will be all dim of input is 0.

auto d_tensor_in_p = net_executer.get_in("input_0");
auto valid_shape_in = d_tensor_in_p->valid_shape();
for (int i = 0; i < valid_shape_in.size(); i++) {
LOG(INFO) << "detect input dims[" << i << "]" << valid_shape_in[i];
}

image

使用external_converter_v2目录下的converter.py转换mobilenet-ssd的caffemodle模型失败

config.yaml的文件内容如下:

OPTIONS:
    Framework: CAFFE
    SavePath: ./output
    ResultName: mobilenet-ssd
    Config:
        LaunchBoard: ON
        Server:
            ip: 0.0.0.0
            port: 8888
        OptimizedGraph: 
            enable: OFF
            path: /home/public/CLionProjects/Anakin/tools/external_converter_v2/anakin_optimized/mobilenet.anakin.bin.saved
    LOGGER:
        LogToPath: ./log/
        WithColor: ON 

TARGET:
    CAFFE:
        # path to proto files
        ProtoPaths:
            - /home/public/CLionProjects/Anakin/tools/external_converter_v2/caffe.proto
        PrototxtPath: /home/public/CLionProjects/Anakin/tools/external_converter_v2/mobilenet-ssd/MobileNetSSD_deploy.prototxt
        ModelPath: /home/public/CLionProjects/Anakin/tools/external_converter_v2/mobilenet-ssd/MobileNetSSD_deploy.caffemodel

其中caffe.proto文件使用来源为:https://github.com/weiliu89/caffe/blob/ssd/src/caffe/proto/caffe.proto
MobileNet-SSD模型来源为:https://github.com/chuanqi305/MobileNet-SSD

运行python converter.py命令,执行过程中出现如下错误:

INF | 2018-09-12 19:56:12.527134 | parser_caffe.py:539 _Parsing_new() ]    `--[ Match ]Parsing [Permute:    conv11_mbox_conf_perm] 
INF | 2018-09-12 19:56:12.527407 | parser_caffe.py:524 _Parsing_new() ]   Dectect [Flatten: conv11_mbox_conf_flat] 
INF | 2018-09-12 19:56:12.527663 | parser_caffe.py:539 _Parsing_new() ]    `--[ Match ]Parsing [Flatten:    conv11_mbox_conf_flat] 
INF | 2018-09-12 19:56:12.527922 | parser_caffe.py:524 _Parsing_new() ]   Dectect [PriorBox:    conv11_mbox_priorbox] 
INF | 2018-09-12 19:56:12.528170 | parser_caffe.py:539 _Parsing_new() ]    `--[ Match ]Parsing [PriorBox:   conv11_mbox_priorbox] 
Traceback (most recent call last):
  File "converter.py", line 20, in <module>
    graph = Graph(config)
  File "/home/public/CLionProjects/Anakin/tools/external_converter_v2/parser/graph.py", line 39, in __init__
    self.graph_io = self.parser()
  File "/home/public/CLionProjects/Anakin/tools/external_converter_v2/parser/caffe/parser_caffe.py", line 34, in __call__
    return self._Parsing_new()
  File "/home/public/CLionProjects/Anakin/tools/external_converter_v2/parser/caffe/parser_caffe.py", line 570, in _Parsing_new
    CAFFE_LAYER_PARSER[source_layer_type](nodeIO, rlayer, tensors, opIO) # call parser automatically
  File "/home/public/CLionProjects/Anakin/tools/external_converter_v2/parser/operations/op.py", line 42, in __call__
    return self.parser(args)
  File "/home/public/CLionProjects/Anakin/tools/external_converter_v2/parser/caffe/caffe_layer_param_transmit.py", line 39, in warpper_args
    Parser(args)
  File "/home/public/CLionProjects/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'

请求帮助,非常感谢!

Support for different input shapes between frames

Hi, I have a new question,

Does Anakin support “variadic” input shapes? For example, in frame 1, I have one standard 224224 image as input. But in frame 2, I have another image of any arbitrary size like 456789. I would like to know if Anakin could support.

Thank you~ ~

Help!! Crash in Net init.

Thanks for the great library.
I want to run mobilenet (in benchmark example) on ARM in jni and model was converted successfully.
I follow the arm inference example classification.cpp.
Model loaded successfully and graph.get_outs() returns OK.
But when call
Net<ARM, AK_FLOAT, Precision::FP32, OpRunType::SYNC> net_executer(graph, ctx1, true);
app crashes.
Crash context is following module in net.cpp.

template<typename Ttype, DataType Dtype, Precision Ptype, OpRunType RunType>
void Net<Ttype, Dtype, Ptype, RunType>::init(graph::Graph<Ttype, Dtype, Ptype>& graph,
OpContextPtr ctx) {

init_env(graph);
// shallow copy
_graph_p->CopyFrom(graph);
auto node_names_in_exec_order = graph.get_nodes_in_order();
// infer basic shape and parsing parameter from graph
for (auto& node_name : node_names_in_exec_order) {
    auto node_ptr = (*_graph_p)[node_name];
    //LOG(ERROR) << "get node " << node_name << ", op type " << node_ptr->get_op_name();
    if (node_ptr->get_op_name() == "Output") {
        continue;
    }

    // create operations
    auto* op_pointer = OpFactory<Ttype, Dtype, Ptype>::Global()[node_ptr->get_op_name()]; // Crash

node_ptr->get_op_name() is "Input".
Global().get_list_op_name() returns empty list.

What can be the issue?
Hope to any suggestions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.