Skip to content

使用tensorrt推理,结果不对 #348

Description

@jiangxiangchuan

Hello, I converted model .pth file to .onnx file by tools/export_onnx.py, then I convert .onnx file to .trt file by tensorrt/build/segment. The n_cats is 3. The command is as belows:

python tools/export_onnx.py --config configs/bisenet_my.py --weight-path /project/bisenet/res/model_best.pth --outpath /project/bisenet/res/model_best.onnx --aux-mode eval

./segment compile /project/bisenet/res/model_best.onnx /project/bisenet/res/model_best.trt --fp16 8

When I use .trt file to infer with one image, it encounters an error. The command is as below:

./segment run /project/bisenet/res/model_best.trt ./1.bmp ./1_result.bmp

I debugged the code, and find the retrun numbers of the following code are very large as showed in following image.
the infer code:
Image
the value of res:
Image

Why does it happen?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions