Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So many mistakes in cpp inference code #345

Open
Gwencong opened this issue Jul 5, 2023 · 0 comments
Open

So many mistakes in cpp inference code #345

Gwencong opened this issue Jul 5, 2023 · 0 comments

Comments

@Gwencong
Copy link

Gwencong commented Jul 5, 2023

When I inferred with the same image of culane with python and cpp, python result was correct but cpp result was wrong, then I read the cpp inference code and find there were so many mistakes in the cpp inference code with libtorch,such as:

  1. image process: python code was normalized with imagenet mean and std, but cpp was not;
  2. the arange idx in here was inconsistent with python;
  3. the axis of sum op here after softmax and multiply with arange idx was wrong;
  4. the decode of xy coordinate was wrong here: it should be loc instead of outputTensor, loc was the correct result but outputTensor is just the result of argmax;

Perhaps there are other errors in the cpp code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant