From 7bb6edf4a74686b7c6b9eb680d3a5cb3d74754a7 Mon Sep 17 00:00:00 2001 From: Guangda Lai Date: Thu, 16 May 2019 16:21:41 -0700 Subject: [PATCH] Fix example code for conversion in TF 2.0. PiperOrigin-RevId: 248622110 --- tensorflow/python/compiler/tensorrt/trt_convert.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/compiler/tensorrt/trt_convert.py b/tensorflow/python/compiler/tensorrt/trt_convert.py index c9348b79575..a42a04bc2ac 100644 --- a/tensorflow/python/compiler/tensorrt/trt_convert.py +++ b/tensorflow/python/compiler/tensorrt/trt_convert.py @@ -853,8 +853,7 @@ class TrtGraphConverterV2(object): precision modes): ```python - TrtConversionParams params = DEFAULT_TRT_CONVERSION_PARAMS._replace( - precision_mode='FP16') + params = DEFAULT_TRT_CONVERSION_PARAMS._replace(precision_mode='FP16') converter = TrtGraphConverterV2( input_saved_model_dir="my_dir", conversion_params=params) converter.convert() @@ -868,7 +867,7 @@ class TrtGraphConverterV2(object): function with some input data: ```python - TrtConversionParams params = DEFAULT_TRT_CONVERSION_PARAMS._replace( + params = DEFAULT_TRT_CONVERSION_PARAMS._replace( precision_mode='FP16', # Set this to a large enough number so it can cache all the TRT engines. maximum_cached_engines=16)