We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
can I get help on how to run with dynamic shape input in python? can you add an example in python?
import cv2 import tritonclient.grpc as grpc_client import time import sys sys.path.append("/opt/nvocdr/tiny-tensorrt/build/lib") import pytrt import numpy as np # /opt/nvocdr/tiny-tensorrt/build/lib/pytrt.cpython-310-x86_64-linux-gnu.so # Assuming engine creation logic exists prior to this snippet # Load the engine engineFile = r"/opt/nvocdr/engines/ocdnet.fp16.engine" onnx_model = r"/opt/nvocdr/onnx_model/ocdnet.onnx" trt = pytrt.Trt() # Create an optimization profile min_shape = (1, 3, 736, 1280) # Define minimum input shape max_shape = (4, 3, 736, 1280) # Define maximum input shape # opt_profile = trt.create_optimization_profile() trt.AddDynamicShapeProfile('INPUT_DATA', min_shape, max_shape) trt.AddDynamicShapeProfile('INPUT_IMG_EXTENSION', min_shape, max_shape) trt.BuildEngine(onnx_model, engineFile)
The text was updated successfully, but these errors were encountered:
Sorry I won't work in this project now since we had better alternatives.
E.g. you can use TensorRT's python API directly, or use trtexec or polygraphy to do the engine built quickly.
Sorry, something went wrong.
zerollzeng
No branches or pull requests
can I get help on how to run with dynamic shape input in python? can you add an example in python?
The text was updated successfully, but these errors were encountered: