docs: fix docstring signature of torch.{onnx,utils} (#54662)
Summary:
fixes https://github.com/pytorch/pytorch/issues/50018
fixes https://github.com/pytorch/pytorch/issues/50017
https://11811000-65600975-gh.circle-artifacts.com/0/docs/onnx.html#functions
https://11811000-65600975-gh.circle-artifacts.com/0/docs/mobile_optimizer.html
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54662
Reviewed By: ailzhang
Differential Revision: D27328485
Pulled By: zou3519
fbshipit-source-id: e658542072ba633b9c309145fc5182edf895d0a6
diff --git a/torch/onnx/__init__.py b/torch/onnx/__init__.py
index f38e0ac..0adb78c 100644
--- a/torch/onnx/__init__.py
+++ b/torch/onnx/__init__.py
@@ -255,7 +255,7 @@
to 1 by default.
enable_onnx_checker (bool, default True): If True the onnx model checker will be run
as part of the export, to ensure the exported model is a valid ONNX model.
- external_data_format (bool, default False): If True, then the model is exported
+ use_external_data_format (bool, default False): If True, then the model is exported
in ONNX external data format, in which case some of the model parameters are stored
in external binary files and not in the ONNX model file itself. See link for format
details:
diff --git a/torch/utils/mobile_optimizer.py b/torch/utils/mobile_optimizer.py
index ceda708..0a83a5e 100644
--- a/torch/utils/mobile_optimizer.py
+++ b/torch/utils/mobile_optimizer.py
@@ -25,7 +25,7 @@
optimization_blocklist: 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.
- perserved_methods: A list of methods that needed to be preserved when freeze_module pass is invoked
+ preserved_methods: A list of methods that needed to be preserved when freeze_module pass is invoked
backend: Device type to use for running the result model ('CPU'(default), 'Vulkan' or 'Metal').
methods_to_optimize: List of functions to optimize, CPU only, forward is optimized if it exists
Returns: