diff --git a/tensorflow/virtual_root_template_v1.__init__.py b/tensorflow/virtual_root_template_v1.__init__.py index 9a45bc0355d..cc2575daeec 100644 --- a/tensorflow/virtual_root_template_v1.__init__.py +++ b/tensorflow/virtual_root_template_v1.__init__.py @@ -100,6 +100,8 @@ for _m in _top_level_modules: # We still need all the names that are toplevel on tensorflow_core from tensorflow_core import * +_major_api_version = 1 + # In V1 API we need to print deprecation messages from tensorflow.python.util import deprecation_wrapper as _deprecation if not isinstance(_sys.modules[__name__], _deprecation.DeprecationWrapper): diff --git a/tensorflow/virtual_root_template_v2.__init__.py b/tensorflow/virtual_root_template_v2.__init__.py index bd8c903e455..22dfbb0c44f 100644 --- a/tensorflow/virtual_root_template_v2.__init__.py +++ b/tensorflow/virtual_root_template_v2.__init__.py @@ -100,6 +100,8 @@ for _m in _top_level_modules: # We still need all the names that are toplevel on tensorflow_core from tensorflow_core import * +_major_api_version = 2 + # These should not be visible in the main tf module. try: del core