TensorFlow 2.x - 2.5 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2022-06-15
Version
2.5 English

WeGO-TensorFlow2.x is a sub-project of WeGO, which is designed to improve the Vitis AI EoU by integrating the Vitis AI toolchain into TensorFlow 2.x framework. For VAI 2.5, TensorFlow v2.8.0 is supported. The input for WeGO-TensorFlow2.x is a quantized model with HDF5 format usually named as quantized.h5, which is generated by vai_q_tensorflow2 quantizer. The WeGO core API create_wego_model() automatically converts the quantized Keras model into new concrete function where cloud DPU compatible subgraphs are transformed into TensorFlow operator with the kind of VaiWeGOOp.

The whole WeGO-TensorFlow2.x inference can be abstracted into the following for steps:
  1. Import WeGO tensorflow2.x Python module into the application.
  2. Get batch info of DPU target from vitis_vai.get_target_info() for inputs batching process.
  3. Create wego model with vitis_vai.create_wego_model() to get concrete function.
  4. Run concrete function.