torch2trt will impact the normal pytorch?
See original GitHub issuein pytorch, I can do the below code right:
a = torch.ones((4, 3, 13, 13), dtype=torch.uint8)
b = torch.rand((4, 3, 13, 13))
c = b[a]
but if I use torch2trt to convert model, then execute the code. error whill occur:
IndexError: too many indices for tensor of dimension 4
Will any one reproduce this error.
Wait for your help~
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (2 by maintainers)
Top Results From Across the Web
Reduced Precision - torch2trt
Reduced Precision. For certain platforms, reduced precision can result in substantial improvements in throughput, often with little impact on model accuracy ...
Read more >Accelerating Inference Up to 6x Faster in PyTorch with Torch ...
The average throughput reported by PyTorch and TorchScript JIT would be similar. Inference using Torch-TensorRT. To compile the model with Torch ...
Read more >Inference Mode — PyTorch master documentation
To work around you can make a clone outside InferenceMode to get a normal ... Both guards affects tensor execution process to skip...
Read more >Torch-TensorRT v1.4.0dev0+c796d26 documentation - PyTorch
Ahead-of-time compilation of TorchScript / PyTorch JIT for NVIDIA GPUs. Torch-TensorRT is a compiler for PyTorch/TorchScript, targeting NVIDIA GPUs via NVIDIA's ...
Read more >pytorch expand_as
Expanding along a non-singleton dimension will The easiest way to expand ... To Tensorrt Pytorch We will use torch2trt module to convert torch...
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
I have follow pytorch yolov3 . I use torch2trt convert the backbone. After convert, pytorch became abnormal as I mention: b[a] will cause an indexerror, so I have to change it to b[a.tolist()].
If I don’t convert the backbone by torch2trt, b[a] work properly