Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

mx.contrib.tensorrt.tensorrt_bind got a bad result! #12598

Closed
lizhen2017 opened this issue Sep 19, 2018 · 7 comments · Fixed by #13310
Closed

mx.contrib.tensorrt.tensorrt_bind got a bad result! #12598

lizhen2017 opened this issue Sep 19, 2018 · 7 comments · Fixed by #13310
Labels

Comments

@lizhen2017
Copy link

Environment:mxnet-tensorrt-cu90 tensorrt 4.0, cuda9.0, cudnn 7.1 python3.5
(1)Inference with sym.simple_bind got right detection result.
executor = sym.simple_bind(ctx=ctx, data=batch_shape, grad_req='null', force_rebind=True)
executor.copy_params_from(arg_params, aux_params)
(2) Inference with mx.contrib.tensorrt.tensorrt_bind got bad result
os.environ['MXNET_USE_TENSORRT'] = '1'
arg_params.update(aux_params)
all_params = dict([(k, v.as_in_context(mx.gpu(1))) for k, v in arg_params.items()])
executor = mx.contrib.tensorrt.tensorrt_bind(sym, ctx=mx.gpu(1), all_params=all_params,
data=batch_shape, grad_req='null', force_rebind=True)
(3)Inference with gluon got right detection result.
self.__model = gluon.nn.SymbolBlock(outputs=mx.sym.load(self.__symbol), inputs=mx.sym.var('data'))
self.__model.load_parameters(self.__params, ctx=self.__ctx)
I don't know why.Thanks for your help! Will using tensort makes a lower accuracy?

@stu1130
Copy link
Contributor

stu1130 commented Sep 19, 2018

Thanks for submitting the issue @lizhen2017
@mxnet-label-bot[Bug]

@marcoabreu marcoabreu added the Bug label Sep 19, 2018
@lupesko
Copy link
Contributor

lupesko commented Sep 21, 2018

@KellenSunderland - can you take a look please?

@KellenSunderland
Copy link
Contributor

@lizhen2017 Thanks for the report. Would you be able to share the model you're working with?

@lizhen2017
Copy link
Author

lizhen2017 commented Sep 22, 2018

@KellenSunderland @KellenSunderland I implement a tiny-yolov3 network, the network inference well without trt api, and how can share the model?

@piyushghai
Copy link
Contributor

@KellenSunderland @larroy bouncing...

@lupesko
Copy link
Contributor

lupesko commented Nov 5, 2018

@mxnet-label-bot [TensorRT]

@KellenSunderland
Copy link
Contributor

@lizhen2017 Sorry missed your question. If you're using the symbol API you can save using https://mxnet.apache.org/api/python/symbol/symbol.html#mxnet.symbol.Symbol.save

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

Successfully merging a pull request may close this issue.

6 participants