TenosrRt float16 cannot predict correctly.
Closed this issue · 3 comments
QinWinner commented
As my question shows, I cannot get the correct prediction result when using float16. Obtained predictions often do not have any segmentation results. When I converted tensorRt to float32, all the problems were solved.
QinWinner commented
I have solved the problem, it was my failure to export the onnx to float16 format that was causing the problem. However, I need to make a small change to the original code to export to float16 onnx format. All the changes are basically in the if ONNX_EXPORT section, so I'll give a small example here.
ke-dev commented
Hi developer, how did you convert to tensorrt model, did you use the onnx2trt tool,
much appreciation
QinWinner commented
@ke-dev you can try using the library https://github.com/onnx/onnx-tensorrt