Make sure that TensorFlow code can use tf2.enabled() at import time.
Fixes #36700. PiperOrigin-RevId: 302924977 Change-Id: I22991018941dcb1ad9a862320f1effaa5238218a
This commit is contained in:
parent
ac191b5591
commit
35a382295a
@ -41,6 +41,10 @@ import sys as _sys
|
||||
from tensorflow.python.tools import module_util as _module_util
|
||||
from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
|
||||
|
||||
# Make sure code inside the TensorFlow codebase can use tf2.enabled() at import.
|
||||
from tensorflow.python import tf2 as _tf2
|
||||
_tf2.enable()
|
||||
|
||||
# API IMPORTS PLACEHOLDER
|
||||
|
||||
# WRAPPER_PLACEHOLDER
|
||||
|
Loading…
x
Reference in New Issue
Block a user