Torch2trt broken for latest L4T 32.4.3 release? Seeing "add_constant incompatible" errors.
See original GitHub issueHi,
I upgraded L4T versions from 32.2.1 to the latest release 32.4.3, which has me upgrading from PyTorch 1.3 to PyTorch 1.6.0 and TensorRT 6 to TensorRT 7.1.3. I believe I also upgraded from CUDA 10.0 to CUDA 10.2.
It looks like torch2trt is now broken. After upgrading, I’m now receiving this warning:
WARNING: Unsupported numpy data type. Cannot implicitly convert to tensorrt.Weights.
Followed by this error:
TypeError: add_constant(): incompatible function arguments. The following argument types are supported:
1. (self: tensorrt.tensorrt.INetworkDefinition, shape: tensorrt.tensorrt.Dims, weights: tensorrt.tensorrt.Weights) -> tensorrt.tensorrt.IConstantLayer
Invoked with: <tensorrt.tensorrt.INetworkDefinition object at 0x7f1c56e1b8>, (), array(17287)
As per issue #313, I tried the fix in this comment. The issue disappears but the problem then arises in other areas of the code.
This same conversion using the same PyTorch model works in L4T 32.2.1 (PyTorch 1.3 and TensorRT 6).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
NVIDIA DeepStream SDK Developer Guide : Quick Start Guide
Follow the directory's README file to run the application. Note: If the application encounters errors and cannot create Gst elements, remove the GStreamer...
Read more >Jetson tx2 issues and how to fix | GitAnswer
New post in Jetson tx2 tag. Checkout the issues related to ... Torch2trt broken for latest L4T 32.4.3 release? Seeing "add_constant incompatible" errors....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can convert your pytorch YOLO model before the three YOLO layers, because this series of problems come from them.
try
model.eval().cuda()
instead ofmodel.cuda()