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 DPUCZDX8G of ZCU102 board are:
/vai_c_caffe --prototxt ./deploy.prototxt --caffemodel ./deploy.caffemodel --arch /opt/vitis_ai/compiler/arch/DPUCZDX8G/ZCU102/arch.json --output_dir model --net_name restnet50
/opt/vitis_ai/compiler/vai_c_tensorflow --frozen_pb ./deploy.pb --arch /opt/vitis_ai/compiler/arch/DPUCZDX8G/ZCU102/arch.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/DPUCZDX8G/ZCU104/arch.json. For the other specified options, see Vitis AI Compiler.