-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
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
torch2trt will impact the normal pytorch? #262
Comments
Hi z13974509906, Thanks for reaching out! I would like to try and reproduce this issue. Do you mind sharing the model that you were attempting to convert? Best, |
I have follow pytorch yolov3 . I use torch2trt convert the backbone. If I don't convert the backbone by torch2trt, b[a] work properly |
you can also test |
any update? |
IndexError: too many indices for tensor of dimension 2 |
Uss tensor.tolist() may solve it. But it won't work everywhere |
Hello where is it placed?for example x=randn(1,3,244,244).cuda().tolist(), |
no, I found it only impact index. for example : b[a] should change to b[a.tolist()] |
Hello, do you have an email? I have some questions for you. Thank you |
I have the same problem, add tolist() can solve it, But I don't know why? |
Can you tell me where to add tolist (), I didn't solve the problem,thanks! |
add tolist() in your index tensor array |
I may be powerless. The only way to solve the problem is debugging step by step. I recommend pdb or code |
I think this is the same as #270 |
I have the same problem. I debug the code on Nvidia jetson AGX, after debugging, I think torch2trt will really impact the original pytorch. Can anyone solve it? Or tell me the reason for the problem. Thanks! |
@dancingpipi @PressEtoRace Did you succeed in optimizing inference time of YOLOv3? if yes, Do you detect all objects well with a good accuracy? because the model I am working on can detect only one object! |
|
same problem |
I have also found out when running mask rcnn with mmdetection, it would throw cuda error at torch.tensor.any()
but after commenting out the converter of getitem (https://github.com/NVIDIA-AI-IOT/torch2trt/blob/master/torch2trt/converters/getitem.py#L32), it would work fine. I think overriding torch.getitem is dangerous, since other torch api would use that. why not convert |
would you please show how to solve this problem more clearly? thanks! |
Tried this example with PR #691 and there is no error. |
in pytorch, I can do the below code right:
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~
The text was updated successfully, but these errors were encountered: