Fix visibility for tf.keras.__version__
authorMark Daoust <markdaoust@google.com>
Mon, 4 Jun 2018 18:11:06 +0000 (11:11 -0700)
committerMark Daoust <markdaoust@google.com>
Fri, 8 Jun 2018 22:21:58 +0000 (15:21 -0700)
PiperOrigin-RevId: 199161696

tensorflow/python/keras/__init__.py
tensorflow/python/keras/integration_test.py

index 197f306..3493069 100644 (file)
@@ -41,8 +41,12 @@ from tensorflow.python.keras.layers import Input
 from tensorflow.python.keras.models import Model
 from tensorflow.python.keras.models import Sequential
 
+from tensorflow.python.util.tf_export import tf_export
+
 __version__ = '2.1.6-tf'
 
+tf_export('keras.__version__').export_constant(__name__, '__version__')
+
 del absolute_import
 del division
 del print_function
index 2e83544..2a05699 100644 (file)
@@ -29,6 +29,9 @@ from tensorflow.python.platform import test
 
 class KerasIntegrationTest(test.TestCase):
 
+  def test_version(self):
+    self.assertTrue(keras.__version__.endswith('-tf'))
+
   def test_vector_classification_sequential(self):
     with self.test_session():
       np.random.seed(1337)