The function is to inspect 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):
- Float module to be depolyed
- Input tensor with the same shape as real input of float module, but the value can be random number
- Trace model on GPU or CPU
- Directory for inspection results
- 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
- Export visualized inspection result. Supports SVG and PNG image formats.