🦊TensorRT的Python接口解析
import tensorrt as trtThe Build Phase
logger = trt.Logger(trt.Logger.WARNING)class MyLogger(trt.ILogger):
def __init__(self):
trt.ILogger.__init__(self)
def log(self, severity, msg):
pass # Your custom logging implementation here
logger = MyLogger()builder = trt.Builder(logger)Creating a Network Definition in Python
Importing a Model using the ONNX Parser
Building an Engine
Deserializing a Plan
Performing Inference
Last updated