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

Export, detect and validation with TensorRT engine file #5699

Merged
merged 19 commits into from
Nov 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert deprecation warning fix
@imyhxy it seems we can't apply the deprecation warning fix because then export fails, so I'm reverting my previous change here.
  • Loading branch information
glenn-jocher committed Nov 22, 2021
commit b9831f876e6b5c4eea268228e06169b2ce049c87
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=F
LOGGER.info(f'{prefix} building FP{16 if half else 32} engine in {f}')
if half:
config.set_flag(trt.BuilderFlag.FP16)
with builder.build_serialized_network(network, config) as engine, open(f, 'wb') as t:
with builder.build_engine(network, config) as engine, open(f, 'wb') as t:
t.write(engine.serialize())
LOGGER.info(f'{prefix} export success, saved as {f} ({file_size(f):.1f} MB)')

Expand Down