torch2trt
torch2trt copied to clipboard
An easy to use PyTorch to TensorRT converter
### Description: I'm experiencing a discrepancy between the inference results of my PyTorch model and the TensorRT model obtained by converting it using the torch2trt tool. ### Reproduce This can...
### Description: I'm experiencing a discrepancy between the inference results of my PyTorch model and the TensorRT model obtained by converting it using the torch2trt tool. ### Reproduce This can...
i convert alphapose fast_res50_256x192.pth model, but i encounter the unsupported layer ?
My Code : # create example data, x = torch.ones((1, 3, 112, 112)).cuda() model_trt_new = TRTModule() model_trt_new.load_state_dict(torch.load('face_trt.pth')) y_trt_new = model_trt_new(x) This code can run normally, but when it is finished,...
my model's accuracy drops a lot when I convert it into fp16 mode, even a pretrained resnet34 experienced accuracy drop in fp16 mode. ``` import os os.environ['CUDA_MODULE_LOADING'] = 'LAZY' from...
Model export is failing on: ```bash File "/venv/lib/python3.10/site-packages/torch2trt-0.4.0-py3.10.egg/torch2trt/torch2trt.py", line 310, in wrapper converter["converter"](ctx) File "/venv/lib/python3.10/site-packages/torch2trt-0.4.0-py3.10.egg/torch2trt/converters/interpolate.py", line 81, in convert_interpolate_trt7 if not isinstance(scales, collections.Sequence): AttributeError: module 'collections' has no attribute 'Sequence'...
Python deprecated collections.Sequence in favor of collections.abc.Sequence. The update checks for the Python version and uses collections.abc instead of collections for Python versions over 3.9
The following code: ```python import torch from torch2trt import torch2trt import timm vit_model = timm.create_model( model_name="vit_base_patch16_224_dino", pretrained=True, ) vit_model.to("cuda") vit_model.eval() input_shape = (4, 3, 224, 224) input_data = torch.rand(input_shape, dtype=torch.float32).cuda()...
I want to convert a model to trt but I have a problem with `nn.AdaptiveMaxPool2d`. It seems like it only works for specific `kernel_size`. In my case its `(384, 384)`...
Hi guys, I had a jetson AGX Xavier on which I developed an action recognition app using your torch2trt and trt_pose, and it worked well. This was in January 2021....