diff --git a/dygraph/deploy/python/infer.py b/dygraph/deploy/python/infer.py index 911c4fd974b43b170acf2596addbd80806b725fb..4d9feb214d8b00dc9e6e50619b49afa38c6e6b79 100644 --- a/dygraph/deploy/python/infer.py +++ b/dygraph/deploy/python/infer.py @@ -316,7 +316,11 @@ def load_predictor(model_dir, # initial GPU memory(M), device ID config.enable_use_gpu(200, 0) # optimize graph and fuse op - config.switch_ir_optim(True) + # FIXME(dkp): ir optimize may prune variable inside graph + # and incur error in Paddle 2.0, e.g. in SSDLite + # FCOS model, set as False currently and should + # be set as True after switch_ir_optim fixed + config.switch_ir_optim(False) else: config.disable_gpu()