[tools/onnx-subgraph] add onnx inference verification code#14745
Conversation
add single onnx inference code for verification, submodel inference code will be submitted in next PR ONE-DCO-1.0-Signed-off-by: Youxin Chen <yx113.chen@samsung.com>
| include_directories(${Python3_INCLUDE_DIRS}) | ||
|
|
||
| set(ONNX_SUBGRAPH_FILES | ||
| set(ONNX_SUBGRAPH_FILES |
There was a problem hiding this comment.
plz split this space deletion, that doesn't seem to be related to this commit, to another PR.
There was a problem hiding this comment.
plz split this space deletion, that doesn't seem to be related to this commit, to another PR.
when I add single_vs_multiple_onnx.py to CMakeLists in line 21, I found there are some white blanks nearby, so I removed them, can you please consider it as the related updating of line 21? thank you :)
There was a problem hiding this comment.
Plz post to another PR.
There was a problem hiding this comment.
ok, I recovered it now, thank you
| Subgraphsiostxt_path is a txt file that describes the structure of the model graph and is used to get input/output node names. | ||
| The model_path contains paths to multiple onnx files. | ||
| The load_sessions function will sort the onnx models in the model_path according to the order specified in subgraphsiostxt_path. |
There was a problem hiding this comment.
above two line seems to exceed 100 cols. plz split lines.
There was a problem hiding this comment.
yes, I update it now, thank you :)
split long lines to short lines
recover no related updating
|
|
||
| # Default input data dictionary | ||
| default_input_data = { | ||
| "x": np.random.rand(1, 3, 256, 256).astype(np.float32), |
There was a problem hiding this comment.
Q) input has fixed shape and data type. if the input model requires differnt parameters, can this be valid ?
There was a problem hiding this comment.
yes, you are right, actually, I am considering to have dynamic adaptive input according to onnx input shape, it needs more code, I will post this code in next PR
related issue: #14534
historical full changes PR: #14613
add single onnx inference code for verification, sub models inference code will be submitted in next PR
ONE-DCO-1.0-Signed-off-by: Youxin Chen yx113.chen@samsung.com