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

Crash when Optimize Graph? #306

Open dmxj opened 6 years ago

dmxj commented 6 years ago

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

LittleMaer commented 6 years ago

what's kind of model you used? Caffe? pls try v0.1.1

dmxj commented 6 years ago

OK,I will try. So, what versions of Caffe's model support?

and today,I have try paddle model, but similar errors happened.

wechatimg30

This model is a simple minist recognition model, it trained by paddlepaddle == 0.14.0, and in Anakin server, paddle's version is also 0.14.0, protobuf-python's version is 3.6.1, python's version is 2.7.15.  The structure of model: wechatimg31

pangge commented 6 years ago

@dmxj what kind of os do you use? please attach os info to us cat /etc/os-release

dmxj commented 6 years ago

@pangge OS Info:

image

image

throneclay commented 6 years ago

This looks like a compile option error? How do you compile this code and our library? Do you use our static library?