Replace direct TF app import with absl::app.
(1) TF::app is deprecated (2) direct TF import is discouraged. go/gpylint-faq#g-direct-tensorflow-import PiperOrigin-RevId: 360436259 Change-Id: Ie52ed6c717893e69c67b5b046fe9e6cabcb78dc9
This commit is contained in:
parent
613a751b1b
commit
e342aa967d
@ -21,6 +21,8 @@ from __future__ import print_function
|
|||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from absl import app
|
||||||
|
|
||||||
from google.protobuf import message
|
from google.protobuf import message
|
||||||
from google.protobuf import text_format
|
from google.protobuf import text_format
|
||||||
from tensorflow.contrib.fused_conv.ops import gen_fused_conv2d_bias_activation_op # pylint: disable=unused-import
|
from tensorflow.contrib.fused_conv.ops import gen_fused_conv2d_bias_activation_op # pylint: disable=unused-import
|
||||||
@ -32,7 +34,6 @@ from tensorflow.python.framework import importer
|
|||||||
from tensorflow.python.framework import ops
|
from tensorflow.python.framework import ops
|
||||||
from tensorflow.python.grappler import cost_analyzer
|
from tensorflow.python.grappler import cost_analyzer
|
||||||
from tensorflow.python.grappler import tf_optimizer
|
from tensorflow.python.grappler import tf_optimizer
|
||||||
from tensorflow.python.platform import app
|
|
||||||
from tensorflow.python.platform import gfile
|
from tensorflow.python.platform import gfile
|
||||||
from tensorflow.python.training import saver
|
from tensorflow.python.training import saver
|
||||||
|
|
||||||
|
@ -25,8 +25,9 @@ from __future__ import print_function
|
|||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from absl import app
|
||||||
|
|
||||||
from tensorflow.python import _pywrap_graph_analyzer as tf_wrap
|
from tensorflow.python import _pywrap_graph_analyzer as tf_wrap
|
||||||
from tensorflow.python.platform import app
|
|
||||||
|
|
||||||
|
|
||||||
def main(_):
|
def main(_):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user