-m yobx dot … convert an onnx model into dot format#
The command converts an onnx model into a dot file that can be rendered with Graphviz into an image (SVG, PNG, …).
Description#
See yobx.helpers.dot_helper.to_dot().
usage: dot [-h] [-o OUTPUT] [-v VERBOSE] [-r RUN] input
Converts a model into a dot file dot can draw into a graph.
positional arguments:
input onnx model to lighten
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
dot model to output or empty to print out the result
-v VERBOSE, --verbose VERBOSE
verbosity
-r RUN, --run RUN run dot, in that case, format must be given (svg, png)
Examples#
Convert a model to dot and render it as SVG in one step:
python -m yobx dot model.onnx -o model.dot --run svg
Or just print the dot source to the terminal:
python -m yobx dot model.onnx