We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The error message is as below:
Traceback (most recent call last): ... model_trt = torch2trt(model, [input_data]) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch2trt-0.4.0-py3.9.egg/torch2trt/torch2trt.py", line 778, in torch2trt outputs = module(*inputs) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1568, in _call_impl result = forward_call(*args, **kwargs) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch/nn/modules/pooling.py", line 984, in forward return F.lp_pool2d(input, float(self.norm_type), self.kernel_size, File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch2trt-0.4.0-py3.9.egg/torch2trt/torch2trt.py", line 300, in wrapper outputs = method(*args, **kwargs) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch/nn/functional.py", line 1042, in lp_pool2d return (torch.sign(out) * relu(torch.abs(out))).mul(kw * kh).pow(1.0 / norm_type) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch2trt-0.4.0-py3.9.egg/torch2trt/torch2trt.py", line 309, in wrapper converter["converter"](ctx) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch2trt-0.4.0-py3.9.egg/torch2trt/converters/mul.py", line 15, in convert_mul input_a_trt, input_b_trt = broadcast_trt_tensors(ctx.network, [input_a_trt, input_b_trt], len(output.shape)) File "/root/miniconda3/envs/nnsmith/lib/python3.9/site-packages/torch2trt-0.4.0-py3.9.egg/torch2trt/torch2trt.py", line 193, in broadcast_trt_tensors if len(t.shape) < broadcast_ndim: ValueError: __len__() should return >= 0
Here is a minimal script to reproduce the issue:
import torch from torch.nn import Module from torch2trt import torch2trt model = torch.nn.LPPool2d(2, 2, 2,).eval().cuda() input_data = torch.randn([1, 3, 7, 7], dtype=torch.float32).cuda() model_trt = torch2trt(model, [input_data])
The text was updated successfully, but these errors were encountered:
Hi, Is there any update for this issue?
Sorry, something went wrong.
The ReLU6 operator has the same problem, here is the script:
ReLU6
import torch from torch.nn import Module from torch2trt import torch2trt model = torch.nn.ReLU6().eval().cuda() input_data=torch.randint(1, 100, [4, 10], dtype=torch.uint8).cuda() model_trt = torch2trt(model, [input_data])
I came across the same issue when using InstanceNorm2d.
InstanceNorm2d
No branches or pull requests
Description:
The error message is as below:
Reproduce:
Here is a minimal script to reproduce the issue:
Environment
The text was updated successfully, but these errors were encountered: