Update document to use latest TF API - gfile has been moved to tf.io

PiperOrigin-RevId: 317748628
Change-Id: I6822e5991d892d238acb0976966e90f60e130961
This commit is contained in:
Tiezhen WANG 2020-06-22 15:33:55 -07:00 committed by TensorFlower Gardener
parent dc756d14ca
commit e653495365
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ converter = tf.lite.TFLiteConverter.from_saved_model(export_dir)
tflite_model = converter.convert()
# Save the TF Lite model.
with tf.gfile.GFile('model.tflite', 'wb') as f:
with tf.io.gfile.GFile('model.tflite', 'wb') as f:
f.write(tflite_model)
```
@ -125,7 +125,7 @@ converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func])
tflite_model = converter.convert()
# Save the TF Lite model.
with tf.gfile.GFile('model.tflite', 'wb') as f:
with tf.io.gfile.GFile('model.tflite', 'wb') as f:
f.write(tflite_model)
```