Xilinx / Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
https://www.xilinx.com/ai
Apache License 2.0
1.47k stars 630 forks source link

vai_c_caffe resnet50 on U250 error! #490

Open zy486at189cn opened 3 years ago

zy486at189cn commented 3 years ago

use: vai_c_caffe --prototxt results/deploy.prototxt --caffemodel results/deploy.caffemodel --output_dir results/ --net_name ResNet_50 --arch /opt/vitis_ai/compiler/arch/DPUCADF8H/U250/arch.json --options "{'mode':'normal', 'save_kernel':''}"

result:


the xmodel cannt be used under VART!!!

When I use it on U280,it success! vai_c_caffe --prototxt results/deploy.prototxt --caffemodel results/deploy.caffemodel --output_dir results/ --net_name ResNet_50 --arch /opt/vitis_ai/compiler/arch/DPUCAHX8H/U280/arch.json --options "{'mode':'normal', 'save_kernel':''}"

result:


the xmodel can be used under VART.

woinck commented 3 years ago

U250 only support batchsize 4. Could you try adding the input_shape key in vai_c_caffe's --options argument? For example:

--options "{'mode':'normal', 'save_kernel':'', 'input_shape': '4,3,224,224'}"

and replace the input channel/height/width with yours

zy486at189cn commented 3 years ago

@woinck nice job!