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

About torch::jit::trace #16

Open
Hugo699 opened this issue Apr 28, 2022 · 3 comments
Open

About torch::jit::trace #16

Hugo699 opened this issue Apr 28, 2022 · 3 comments

Comments

@Hugo699
Copy link

Hugo699 commented Apr 28, 2022

Hello,
Thank you for sharing your work, and I want to use libtorch to deploy this network in C++, but when using torch::jit::trace(), I get this error(executing test_sample.py can run successfully):
image
image
Because torch::jit::trace() cannot handle dictionary, I changed the output of depth_decoder to list, and there is a line "import hr_networks" in test_sample.py, but I did not find hr_networks, I don't know if this affectstorch::jit::trace().

Thank you very much!

@brandleyzhou
Copy link
Owner

  • you can delete the 'import hr_network', but I don't think it is the reason.
  • IF you deploy it when testing, you can let depth_decoder only output a full-scale depth map instead of multi-scale depth maps
  • for this error, Sorry, I am not familiar with the torch.jit.trace. have you tried it on monodepth2? and met the same error?

@Hugo699
Copy link
Author

Hugo699 commented May 2, 2022

Thank you for your time, I don't have the same problem on monodepth2, I think there might be something in HRNet that cannot be traced, but I don't know how to solve it.

@brandleyzhou
Copy link
Owner

I think so, I guess maybe you have to change the way of initializing a hrnet e.g. hrnet_config.py which uses a yacs lib

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

2 participants