Update scheduled deprecated API. (#6163)
author이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 <sj925.lee@samsung.com>
Mon, 5 Aug 2019 01:52:59 +0000 (10:52 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 5 Aug 2019 01:52:59 +0000 (10:52 +0900)
* Change old API `gfile.FastGFile` to `tf.gfile.GFile`

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
tools/pbfile_tool/pb_info.py

index 110b15e..7add94f 100755 (executable)
@@ -16,7 +16,6 @@
 
 import tensorflow as tf
 from google.protobuf import text_format
-from tensorflow.python.platform import gfile
 from tensorflow.python.tools import freeze_graph
 from tensorflow.python.tools import optimize_for_inference_lib
 
@@ -40,7 +39,7 @@ def importGraphIntoSession(sess, filename):
     assert sess
     (_, _, ext) = splitDirFilenameExt(filename)
     if (ext.lower() == 'pb'):
-        with gfile.FastGFile(filename, 'rb') as f:
+        with tf.gfile.GFile(filename, 'rb') as f:
             graph_def = tf.GraphDef()
             graph_def.ParseFromString(f.read())