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:
parent
dc756d14ca
commit
e653495365
|
@ -53,7 +53,7 @@ converter = tf.lite.TFLiteConverter.from_saved_model(export_dir)
|
||||||
tflite_model = converter.convert()
|
tflite_model = converter.convert()
|
||||||
|
|
||||||
# Save the TF Lite model.
|
# 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)
|
f.write(tflite_model)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func])
|
||||||
tflite_model = converter.convert()
|
tflite_model = converter.convert()
|
||||||
|
|
||||||
# Save the TF Lite model.
|
# 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)
|
f.write(tflite_model)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue