-m yobx find … find nodes consuming or producing a result#

The command looks into an onnx model and searches for a set of names, reporting which node is consuming or producing each of them. It can also detect shadowing names – results that are defined more than once.

Description#

See yobx.helpers.onnx_helper.onnx_find() and yobx.helpers.onnx_helper.enumerate_results().

    usage: find [-h] -i INPUT [-n NAMES] [-v VERBOSE] [--v2 | --no-v2]
    
    Look into a model and search for a set of names, tells which node is consuming or producing it.
    
    options:
      -h, --help            show this help message and exit
      -i INPUT, --input INPUT
                            onnx model to search
      -n NAMES, --names NAMES
                            Names to look at comma separated values, if 'SHADOW', search for shadowing names.
      -v VERBOSE, --verbose VERBOSE
                            verbosity
      --v2, --no-v2         Uses enumerate_results instead of onnx_find.
    
    Enables some quick validation.

Examples#

Look for specific result names in a model:

python -m yobx find -i model.onnx -n "result1,result2"

Detect shadowing names (results defined more than once):

python -m yobx find -i model.onnx -n SHADOW

Use the alternative enumerate_results back-end:

python -m yobx find -i model.onnx -n "result1" --v2