onnx / tutorials

Tutorials for creating and using ONNX models
Apache License 2.0
3.39k stars 629 forks source link

onnx to tensorrt error #246

Closed henbucuoshanghai closed 3 years ago

henbucuoshanghai commented 3 years ago

Ask a Question

trained a pth model,and convert it to onnx. but to tensorrt it has an error??

Further information

TensorRT] VERBOSE: ModelImporter.cpp:125: Concat_51 [Concat] inputs: [209 -> (2)], [214 -> (2)], [TensorRT] VERBOSE: ImporterContext.hpp:150: Registering constant layer: 209 for ONNX initializer: 209 [TensorRT] VERBOSE: ImporterContext.hpp:154: Registering layer: Concat_51 for ONNX node: Concat_51 [TensorRT] VERBOSE: ImporterContext.hpp:120: Registering tensor: 215 for ONNX tensor: 215 [TensorRT] VERBOSE: ModelImporter.cpp:179: Concat_51 [Concat] outputs: [215 -> (4)], [TensorRT] VERBOSE: ModelImporter.cpp:103: Parsing node: Upsample_52 [Upsample] [TensorRT] VERBOSE: ModelImporter.cpp:119: Searching for input: 199 [TensorRT] VERBOSE: ModelImporter.cpp:119: Searching for input: 215 [TensorRT] VERBOSE: ModelImporter.cpp:125: Upsample_52 [Upsample] inputs: [199 -> (1, 256, 32, 64)], [215 -> (4)], <tensorrt.tensorrt.OnnxParser object at 0x7fcebfa206b0> [TensorRT] ERROR: Network must have at least one output [TensorRT] ERROR: Network validation failed. Traceback (most recent call last): File "trt.py", line 28, in f.write(engine.serialize()) AttributeError: 'NoneType' object has no attribute 'serialize'

akashAD98 commented 3 years ago

@henbucuoshanghai have you solved the problem?? which repo are you following for converting onnx into tensorRT?

henbucuoshanghai commented 3 years ago

iforget it。 。。 sorry ..