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)
- tf.keras.Model instance, the float model to be inspected. Float model should have concrete input shapes, please build the float model with concrete input shapes or call inspect_model with `input_shape` argument.
- list(int) or list(list(int)), contains the input shape for each input layer. Use default shape info in input layers if not set. Use list of shapes for multiple inputs, e.g. 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, batch_size dimension should be omitted. Default to None.
- bool, whether to dump the inspected model and save model to disk. The default value is False.
- string, path of inspected model file. The default value is 'inspect_model.h5'.
- bool, whether to plot the model inspect results by
graphvizand save image to disk. It is helpful when you need to visualize the model inspect results together with some modification hints. Note that only part of output file types can show the hints, such as
.svg. Default to False.
- string, file path of model image file when plotting the model. Default to 'model.svg'.
- bool, whether to dump the inspect results and save text to disk. More detailed layer by layer results than screen logging will be dumped to the text file. Default to False.
- string, file path of inspect results text file. Default to 'inspect_results.txt'.
- int, the logging verbosity level, more detailed logging results will be showed for higher verbose value. Default to 0.