This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1472|Reply: 1

Use Onnx model inference to warn remove_initializer_from_input issues

[Copy link]
Posted on 2025-1-9 09:29:57 | | | |
Requirements: The following warning appears when C# uses ONNX model inference.

[W:onnxruntime:, graph.cc:1348 onnxruntime::Graph::Graph] Initializer 1 appears in graph inputs and will not be treated as constant value/weight. This may prevent some of the graph optimizations, like const folding. Move it out of graph inputs if there is no need to override it, by either re-generating the model with latest exporter/converter or with the tool onnxruntime/tools/python/remove_initializer_ from_input.py.




Solution:

1. Create a python environment and install dependencies with the following commands:



2. Download or copy remove_initializer_from_input.py locally

File:The hyperlink login is visible.

Place the .onnx model file and .py script under the same folder and execute the following command:




(End)




Previous:Windows looks at the font's character set total number of characters
Next:Use Onnx model inference to warn of CleanUnusedInitializersAndNodeArgs issues
 Landlord| Posted on 2025-1-9 09:44:30 |
Use Onnx model inference to warn of CleanUnusedInitializersAndNodeArgs issues
https://www.itsvse.com/thread-10918-1-1.html
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com