Skip to content

Add load_op_libraries parameter in docs #1853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ python -m tf2onnx.convert
[--concrete_function CONCRETE_FUNCTION]
[--target TARGET]
[--custom-ops list-of-custom-ops]
[--load_op_libraries tensorflow_library_path]
[--large_model]
[--continue_on_error]
[--verbose]
Expand Down Expand Up @@ -225,6 +226,10 @@ runtime can still open the model. The format is a comma-separated map of tf op n
OpName:domain. If only an op name is provided (no colon), the default domain of `ai.onnx.converters.tensorflow`
will be used.

#### --load_op_libraries

Load the comma-separated list of tensorflow plugin/op libraries before conversion.

#### --target

Some models require special handling to run on some runtimes. In particular, the model may use unsupported data types. Workarounds are activated with ```--target TARGET```. Currently supported values are listed on this [wiki](https://github.com/onnx/tensorflow-onnx/wiki/target). If your model will be run on Windows ML, you should specify the appropriate target value.
Expand Down
4 changes: 2 additions & 2 deletions tf2onnx/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def get_args():
parser.add_argument("--use-graph-names", help="(saved model only) skip renaming io using signature names",
action="store_true")
parser.add_argument("--opset", type=int, default=None, help="opset version to use for onnx domain")
parser.add_argument("--dequantize", help="Remove quantization from model. Only supported for tflite currently.",
parser.add_argument("--dequantize", help="remove quantization from model. Only supported for tflite currently.",
action="store_true")
parser.add_argument("--custom-ops", help="Comma-separated map of custom ops to domains in format OpName:domain. "
parser.add_argument("--custom-ops", help="comma-separated map of custom ops to domains in format OpName:domain. "
"Domain 'ai.onnx.converters.tensorflow' is used by default.")
parser.add_argument("--extra_opset", default=None,
help="extra opset with format like domain:version, e.g. com.microsoft:1")
Expand Down