def inspect(…) - 3.5 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2023-09-28
Version
3.5 English
This function inspects a float model:
def inspect(self, 
            module: torch.nn.Module, 
            input_args: Union[torch.Tensor, Tuple[Any]], 
            device: torch.device = torch.device("cuda"),
            output_dir: str = "quantize_result",
            verbose_level: int = 1,
            image_format: Optional[str] = None):

Arguments

module
Float module to be depolyed
input_args
Input tensor with the same shape as the actual float module input, but the value can be a random number
device
Trace model on GPU or CPU
output_dir
Directory for inspection results
verbose_level
Control the level of detail of the inspection results displayed on the screen. The default value is 1.
0: turn off printing inspection results
1: print summary report of operations assigned to CPU
2: print summary report of device allocation of all operations
image_format
Export visualized inspection result. Supports SVG and PNG image formats.