vitis_inspect.VitisInspector.inspect_model - 3.5 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2023-09-28
Version
3.5 English
This function performs float model inspection:

VitisInspector.inspect_model(model, 
                             input_shape=None,
                             dump_model=True,
                             dump_model_file="inspect_model.h5",
                             plot=True,
                             plot_file="model.svg",
                             dump_results=True,
                             dump_results_file="inspect_results.txt",
                             verbose=0)

Arguments

model
tf.keras.Model instance. The float model to be inspected. The float model should have concrete input shapes. Build the float model with concrete input shapes or call inspect_model with the input_shape argument.
input_shape
list(int) or list(list(int))  Contains the input shape for each input layer. Use default shape information in the input layers if not set. Use the list of shapes for multiple inputs, for example, inspect_model(model, input_shape=[224, 224, 3]) or inspect_model(model, input_shape=[[224, 224, 3], [64, 1]]). All dimensions should have concrete values, and the batch_size dimension should be omitted. The default value is None.
dump_model
bool. Indicates whether to dump the inspected model and save the model to disk. The default value is False.
dump_model_file
String. The path of the inspected model file. The default value is inspect_model.h5.
plot
bool. Indicates whether to plot the model inspect results by graphviz and save the image to disk. It is helpful when you need to visualize the model inspection results with some modification hints. Only some output file types can show the hints, such as .svg. The default value is False.
plot_file
String. The file path of the model image file when plotting the model. The default value is model. svg.
dump_results
bool. Indicates whether to dump the inspect results and save text to disk. More detailed layer-by-layer results than screen logging are dumped into the text file. The default value is False.
dump_results_file
string. The file path of inspect results text file. The default value is inspect_results.txt.
verbose
int. The logging verbosity level; more detailed logging results show for higher verbose value. The default value is 0.