torch.utils.mobile_optimizer
PyTorch Mobile is no longer actively supported. Redirecting to ExecuTorch documentation.
- , , ,
PyTorch Mobile is no longer actively supported. Redirecting to ExecuTorch documentation.
Optimize a torch script module for mobile deployment.
script_module (ScriptModule) – An instance of torch script module with type of ScriptModule.
optimization_blocklist (set[_MobileOptimizerType] | None) – A set with type of MobileOptimizerType. When set is not passed, optimization method will run all the optimizer pass; otherwise, optimizer method will run the optimization pass that is not included inside optimization_blocklist.
preserved_methods (list[AnyStr] | None) – A list of methods that needed to be preserved when freeze_module pass is invoked
backend (str) – Device type to use for running the result model (‘CPU’(default), ‘Vulkan’ or ‘Metal’).
A new optimized torch script module
RecursiveScriptModule
Generate a list of lints for a given torch script module.
script_module (ScriptModule) – An instance of torch script module with type of ScriptModule.
A list of dictionary that contains modules lints
lint_map