Fix example code for conversion in TF 2.0.

PiperOrigin-RevId: 248622110
This commit is contained in:
Guangda Lai 2019-05-16 16:21:41 -07:00 committed by TensorFlower Gardener
parent 59b2a17c22
commit 7bb6edf4a7

View File

@ -853,8 +853,7 @@ class TrtGraphConverterV2(object):
precision modes): precision modes):
```python ```python
TrtConversionParams params = DEFAULT_TRT_CONVERSION_PARAMS._replace( params = DEFAULT_TRT_CONVERSION_PARAMS._replace(precision_mode='FP16')
precision_mode='FP16')
converter = TrtGraphConverterV2( converter = TrtGraphConverterV2(
input_saved_model_dir="my_dir", conversion_params=params) input_saved_model_dir="my_dir", conversion_params=params)
converter.convert() converter.convert()
@ -868,7 +867,7 @@ class TrtGraphConverterV2(object):
function with some input data: function with some input data:
```python ```python
TrtConversionParams params = DEFAULT_TRT_CONVERSION_PARAMS._replace( params = DEFAULT_TRT_CONVERSION_PARAMS._replace(
precision_mode='FP16', precision_mode='FP16',
# Set this to a large enough number so it can cache all the TRT engines. # Set this to a large enough number so it can cache all the TRT engines.
maximum_cached_engines=16) maximum_cached_engines=16)