Fixed Trackable import. (#21429)
This commit is contained in:
1 parent
c759f8df86
commit
525c031959
1 file changed
+5
-1
@@ -352,7 +352,11 @@ def extract_model_graph(argv):
|
||||
from tensorflow.python.training.tracking.base import Trackable # pylint: disable=no-name-in-module,import-error
|
||||
trackable_is_imported = True
|
||||
except:
|
||||
log.warning("Could not import tensorflow.python.training.tracking.base.Trackable type.")
|
||||
try:
|
||||
from tensorflow.python.trackable.base import Trackable
|
||||
trackable_is_imported = True
|
||||
except:
|
||||
log.warning("Could not import tensorflow.python.training.tracking.base.Trackable type.")
|
||||
env_setup = get_environment_setup("tf")
|
||||
if isinstance(model, tf.Graph):
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user