Closed ystsaan closed 3 years ago
Hello @ystsaan , could you take a try with the get_shape
in the IExecutionContext
which will involve shape inference? thanks
https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/infer/Core/ExecutionContext.html#tensorrt.IExecutionContext.get_shape
the problem is caused by the output of inbuilt pytorch segmentation neural network which is a dict and does not have shape attribute. "model(input)['out']" is required to get the final output the neural network. The output of onnx file passed to TensorRT should not be a dict. Thanks very much.
Hi there, I built three networks from onnx files under c++ by referring
https://github.com/NVIDIA/TensorRT/blob/master/samples/opensource/sampleOnnxMNIST/sampleOnnxMNIST.cpp
and checked the network output shape by modifying the following script in bool SampleOnnxMNIST::build() function from line 144 to 150into
Here is the c++ console output.
The last two lines of console output are network input shape and output shape where output shape should be 1 2 112 112 but output -1 -1 -1 -1. So what is the problem here? I also tried other onnx files with Opset version: 10 and the console outputs are correct. Does the problem occur due to opset version or just the onnx model contains some operators that tensorrt does not support?