[2023 CANN Training Camp Season 1] Application Development (Elementary) Chapter 3 - Model Conversion

1. Introduction to model conversion tools

image.png

Before performing model conversion, please be sure to check the following constraints:

  • Supports model conversion with original framework types of Caffe, TensorFlow, MindSpore, ONNX:
  • When the original frame type is Caffe, MindSpore, ONNX, the input data type is FP32, FP16 (realized by setting the input parameter – input_fp16_nodes, MindSpore framework does not support this parameter), UINT8 (realized by configuring data preprocessing – insert_op_conf);
  • When the original framework type is TensorFlow, the input data types are FP16, FP32, UINT8, INT32, INT64, BOOL. When the original framework type is Caffe, the op name and op type of the model file (.prototxt) and weight file (.caffemodel) must be consistent (including capitalization).
  • When the original framework type is TensorFlow, only the FrozenGraphDef format is supported.
  • The input of dynamic shape is not supported, for example: NHWC input is [?,?,?,3] and multiple dimensions can be arbitrarily specified. A fixed value needs to be specified when converting the model.
  • For the Caffe framework network model: the input data supports a maximum of four dimensions, and the reshape operators (reshape, expanddim, etc.) cannot output all layer operators in the five-dimensional model. Except for the const operator, the input and output must satisfy dim!=0.
    Only the operators in the "Operator Specifications" are supported, and operator restrictions must be met.

image.png

image.png

image.png

Supongo que te gusta

Origin blog.csdn.net/qq_45257495/article/details/130874996
Recomendado
Clasificación