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

convert to tensorrt #373

Open
zzypeak opened this issue Apr 7, 2021 · 0 comments
Open

convert to tensorrt #373

zzypeak opened this issue Apr 7, 2021 · 0 comments

Comments

@zzypeak
Copy link

zzypeak commented Apr 7, 2021

I can convert to onnx by the follow command :
python -m tf2onnx.convert --checkpoint model_zoo/model.ckpt.meta --output ckpt_model.onnx --inputs input_images:0 --outputs model_0/feature_fusion/Conv_7/Sigmoid:0,model_0/feature_fusion/concat_3:0 --opset=11
but when I convert the onnx model to tensorrt, an error happen:
[04/07/2021-10:36:49] [V] [TRT] ImporterContext.hpp:97: Registering tensor: input_images:0 for ONNX tensor: input_images:0 [04/07/2021-10:36:49] [V] [TRT] ModelImporter.cpp:90: Importing initializer: roi__2181 ERROR: ModelImporter.cpp:92 In function parseGraph: [8] Assertion failed: convertOnnxWeights(initializer, &weights, ctx) [04/07/2021-10:36:49] [E] Failed to parse onnx file [04/07/2021-10:36:49] [E] Parsing model failed [04/07/2021-10:36:49] [E] Engine creation failed [04/07/2021-10:36:49] [E] Engine set up failed

the command
trtexec --explicitBatch --onnx=model_zoo/ckpt_model.onnx --minShapes=input:1x224x224x3 --optShapes=input:32x224x224x3 --maxShapes=input:32x512x512x3 --saveEngine=model.batch1-32.engine --verbose

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

1 participant