Model Compilation - 1.1 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2020-03-23
Version
1.1 English

The Vitis AI compiler VAI_C supports both Caffe and TensorFlow model compilation. Before applying VAI_C to build Caffe or TensorFlow models, you should run the conda activate vitis-ai-caffe command or the conda activate vitis-ai-tensorflow to activate the Conda environment for the Vitis AI tools.

The commands for compiling Caffe/TensorFlow ResNet50 with VAI_C for edge DPU of ZCU102 board are:

/vai_c_caffe --prototxt ./deploy.prototxt --caffemodel ./deploy.caffemodel --arch /opt/vitis_ai/compiler/arch/dpuv2/ZCU102/ZCU102.json --output_dir model --net_name restnet50

/opt/vitis_ai/compiler/vai_c_tensorflow --frozen_pb ./deploy.pb --arch /opt/vitis_ai/compiler/arch/dpuv2/ZCU102/ZCU102.json --output_dir model --net_name resnet50_tf

The option --arch for vai_c_caffe and vai_c_tensorflow indicates the DPU architecture configuration in which the JSON file is used. For ZCU104 board, the architecture configuration JSON file is /opt/vitis_ai/compiler/arch/dpuv2/ZCU104/ZCU104.json. For the other specified options, see Vitis AI Compiler.