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

tensorrt doesn't accelerate #5

Open
AirFishWang opened this issue May 5, 2019 · 0 comments
Open

tensorrt doesn't accelerate #5

AirFishWang opened this issue May 5, 2019 · 0 comments

Comments

@AirFishWang
Copy link

AirFishWang commented May 5, 2019

Thanks for your demo,
when I run the raw code, it looks work greatly, in order to verify the effect of tensorrt more precise, I add "warm-up" code before infer the graph. eg:

tf_engine = TfEngine(frozen_graph)
for i in range(warm_up):
    y_tf = tf_engine.infer(x_test)
t0 = time.time()
y_tf = tf_engine.infer(x_test)
t1 = time.time()
print('Tensorflow time', t1 - t0)
verify(y_tf, y_keras)

tftrt_engine = TftrtEngine(frozen_graph, batch_size, 'FP32')
for i in range(warm_up):
    y_tftrt = tftrt_engine.infer(x_test)
t0 = time.time()
y_tftrt = tftrt_engine.infer(x_test)
t1 = time.time()
print('TFTRT time', t1 - t0)
verify(y_tftrt, y_keras)

the test result show that tensorrt doesn't accelerate compared with the tensorflow infer process, I don't know why,

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