Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#124 from winter-wang/master
Browse files Browse the repository at this point in the history
update python paddle_trt demo
  • Loading branch information
jiweibo authored Apr 27, 2021
2 parents 1054925 + b0d68d9 commit 79a0777
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/paddle_trt/infer_trt_ernie.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

# this is a simple resnet block for dynamci test.
def init_predictor(args):
config = Config('./model')
if args.model_dir is not "":
config = Config(args.model_dir)
else:
config = Config(args.model_file, args.params_file)
config.enable_memory_optim()
config.enable_use_gpu(100, 0)

Expand Down

0 comments on commit 79a0777

Please sign in to comment.