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

onnx export problem #15

Open
Nioolek opened this issue Apr 3, 2020 · 2 comments
Open

onnx export problem #15

Nioolek opened this issue Apr 3, 2020 · 2 comments

Comments

@Nioolek
Copy link

Nioolek commented Apr 3, 2020

I tried to convert the 3DCNN model to onnx,but the inference results by onnx and pytorch are different.I tried the backbone of resnet18 and mobilenet.Did anybody meet the same problem?

Environment:
CUDA 10.0
CUDNN 7
TENSORRT 7
PYTORCH 1.2.0

CODE:

model, parameters = generate_model(opt)
checkpoint = torch.load('my_mobilenet_1.0x_RGB_10_checkpoint.pth')

model.load_state_dict(checkpoint['state_dict'])
print('load checkpoint')
if isinstance(model, torch.nn.DataParallel):
    model = model.module

x = torch.ones((1, 3, 10, 128, 128)).cuda()

y = model(x)
print(y)

torch.onnx.export(model, x, '3dcnn.onnx', verbose=True)
@okankop
Copy link
Owner

okankop commented Apr 7, 2020

I never tried to cenvert these models to onnx, but in principle it should be possible. When I have time, I would try and let you know.

@poincarelee
Copy link

@okankop After two years, still didn't try on exporting to onnx ? I saw several questions about low accuracy of pretrained models, didn't do any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants