1 Reply Latest reply on Sep 8, 2021 12:46 PM by albertabeef

    How do I compile the TensorFlow2 weight file for the Ultra96v2 board?

    rajivbishwokarma

      Hello everyone,

       

      I am trying to compile the TensorFlow 2 weight file for the Ultra96v2 board. I am following this tutorial: https://github.com/Xilinx/Vitis-AI-Tutorials/blob/master/Design_Tutorials/08-tf2_flow/README.md. In the compiling step, ZCU102 and U50 boards are defined using specific arch.json files. For ZCU102, /opt/vitis_ai/compiler/arch/DPUCZDX8G/ZCU102/arch.json is used, while for U50 /opt/vitis_ai/compiler/arch/DPUCAHX8H/U50/arch.json file is used. My questions are:

       

      1. How do I create this file for the Ultra96v2 board? Or is this already provided by Avnet/Xilinx?

      2. After getting this file, can I use the following command to compile the model for the Ultra96v2 board?

      vai_c_tensorflow2 --model quant_model/q_model.h5 --arch <ultra-96-v2>/arch.json --output_dir compiled_model --net_name customcnn 
      

       

      Thank you!

        • Re: How do I compile the TensorFlow2 weight file for the Ultra96v2 board?
          albertabeef

          Rajiv,

           

          First, the tutorial you are referring to is for Vitis-AI 1.3, which is important to identify.

          Second, the arch.json file you are looking for is generated when a Vitis-AI with DPU is created for any given board.

           

          Xilinx provides arch.json files for their pre-built Vitis-AI designs (ie. ZCU102, U50, etc...).

           

          For the Ultra96-V2, I recommend using the following Vitis-AI 1.3 design, which has a B2304 DPU (with low RAM usage).
             https://avnet.me/vitis-ai-1.3-project

          It comes with the following arch.json file, which can be found in the BOOT partition of the pre-built SD card image:

             {"target":"DPUCZDX8G_ISA0_B2304_MAX_BG2"}

           

          You can use this arch.json file when compiling models to run on this Vitis-AI 1.3 design.

           

          If you generate a design with a different DPU configuration, you will need to use the arch.json specific to that design.

           

          I hope this answers your question ...

           

          Regards,

           

          Mario.

          1 of 1 people found this helpful