NVIDIA-AI-IOT / torch2trt

An easy to use PyTorch to TensorRT converter
MIT License
4.55k stars 671 forks source link

ValueError: __len__() should return >= 0 #876

Open angelicawangmasteruse opened 1 year ago

angelicawangmasteruse commented 1 year ago

Plet let me know how this issue can be fixed, thank you [TRT] [E] 9: [graphShapeAnalyzer.cpp::addVolumeCheck::877] Error Code 9: Internal Error ((Unnamed Layer* 135) [Slice]_output: dimension 1 never exceeds -1) out = self.encoder1(torch.cat([x1, x2], dim=1)) File "/home/user/anaconda3/lib/python3.10/site-packages/torch2trt-0.4.0-py3.10.egg/torch2trt/torch2trt.py", line 310, in wrapper converter"converter" File "/home/user/anaconda3/lib/python3.10/site-packages/torch2trt-0.4.0-py3.10.egg/torch2trt/converters/cat.py", line 16, in convert_cat trt_inputs = broadcast_trt_tensors(ctx.network, trt_inputs, len(output.shape)) File "/home/user/anaconda3/lib/python3.10/site-packages/torch2trt-0.4.0-py3.10.egg/torch2trt/torch2trt.py", line 194, in broadcast_trt_tensors if len(t.shape) < broadcast_ndim: ValueError: len() should return >= 0

farzanehnakhaee70 commented 9 months ago

Hi, Is there any update for this issue?