Closed xieydd closed 4 years ago
Hi xieydd,
Thanks for sharing!
Yes, I'll take a look soon.
Best, John
This is now fixed in this PR (which is merged into master)
https://github.com/NVIDIA-AI-IOT/torch2trt/pull/196
Please try it out and let me know if it works for your use case.
Best, John
Thank you very much. Really appreciate it. I cloned the latest repo and run the code. Unfortunately it is throwing exceptions in Linear converter with the below errors. Please have a look. thanks in advance.
[TensorRT] ERROR: (Unnamed Layer* 1168) [Shuffle]: uninferred dimensions are not an exact divisor of input dimensions, so inferred dimension cannot be calculated Traceback (most recent call last): File "python3.7/site-packages/torch2trt/torch2trt.py", line 202, in wrapper converter'converter' File "..python3.7/site-packages/torch2trt/converters/Linear.py", line 9, in convert_Linear inputtrt = trt(ctx.network, input) File "...python3.7/site-packages/torch2trt/torch2trt.py", line 116, in trt_ num_dim = len(t._trt.shape) # non-leaf tensors must already have _trt, get shape from that ValueError: len() should return >= 0 Terminated
Also it seems some issue in function { def num_slice_types(slices): }
File "python3.7/site-packages/torch2trt/converters/getitem.py", line 18, in num_slice_types for s in slices: TypeError: 'int' object is not iterable
@jaybdub It works, thanks a lot.
The default of torch2trt Linear input`s shape is [Batch,feature_in], the most of situation is [Batch,*,feature_in] in pytorch api, if add a test in
it will be a error, i think this is a bug, @jaybdub Can you take a look at it. same error in #161