Skip to content
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

Errors on converting onnx to trt : 'Assertion failed: ctx->tensors().count(inputName)' #469

Closed
DJMeng opened this issue May 29, 2020 · 6 comments
Labels
question Further information is requested triaged Issue has been triaged by maintainers

Comments

@DJMeng
Copy link

DJMeng commented May 29, 2020

My env is :
torch:1.3 onnx:1.7 opset:11

My onnx is like this:
image

In my pytorch export onnx code,my net-work use:
y = F.interpolate(y, size=sources[2].size()[2:], mode='bilinear', align_corners=False)

when i convert onnx to trt, it have errors:

While parsing node number 63 [Resize]: ERROR: ModelImporter.cpp:124 In function parseGraph: [5] Assertion failed: ctx->tensors().count(inputName)

But if use opset10. It can convert trt is ok, trt infer result is different with the python infer result.
It is so sad.

Gays,Do you meet this errors? Please help me, Thanks very much.

@DJMeng DJMeng mentioned this issue May 29, 2020
@Kyuuki93
Copy link

torch==1.5 works for me

@bing1zhi2
Copy link

bing1zhi2 commented Sep 1, 2020

same error,even my model only have one layer:

`

class Resize_Test(nn.Module):

def __init__(self): 
    super(Resize_Test, self).__init__() 

def forward(self, x): 
    x = F.interpolate(x, size=(128, 128), mode='bilinear', align_corners=True) 
    return x

`

accroding to this issue : https://github.com/NVIDIA/TensorRT/issues/422, I throught this project is a solution,but I got the same error when use onnx2trt command. Any idea?

@kevinch-nv
Copy link
Collaborator

What TRT version are you using? This should be fixed in later onnx-tensorrt releases.

@kevinch-nv kevinch-nv added question Further information is requested triaged Issue has been triaged by maintainers labels Dec 29, 2020
@Yuuuuuuuuuuuuuuuuuummy
Copy link

What TRT version are you using? This should be fixed in later onnx-tensorrt releases.

Hi, i meet the same error, the version of tensorrt i used is 7.2.2.3, i use python onnx-tensorrt which is the latest master branch, the installed onnx-tensorrt version is 7.2.2.3.0, i wonder when this issue will be fixed?

@kevinch-nv
Copy link
Collaborator

Can you provide your ONNX model or the scripts to generate your ONNX model?

@kevinch-nv
Copy link
Collaborator

Closing due to inactivity. If you are still having issues with the latest master branch feel free to open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

5 participants