Remove scope name from bfloat16
authorSourabh Bajaj <sourabhbajaj@google.com>
Fri, 27 Apr 2018 20:01:44 +0000 (13:01 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 27 Apr 2018 20:04:34 +0000 (13:04 -0700)
PiperOrigin-RevId: 194580957

tensorflow/contrib/tpu/python/tpu/bfloat16.py
tensorflow/contrib/tpu/python/tpu/bfloat16_test.py

index 5e49af6..fa74f65 100644 (file)
@@ -73,5 +73,5 @@ def bfloat16_scope():
   This enables variables to be read as bfloat16 type when using get_variable.
   """
   with variable_scope.variable_scope(
-      'bfloat16', custom_getter=_get_custom_getter()) as varscope:
+      '', custom_getter=_get_custom_getter()) as varscope:
     yield varscope
index 48a01c7..26fd376 100644 (file)
@@ -32,7 +32,7 @@ class BFloat16ScopeTest(test.TestCase):
     """Test if name for the variable scope is propogated correctly.
     """
     with bfloat16.bfloat16_scope() as bf:
-      self.assertEqual(bf.name, "bfloat16")
+      self.assertEqual(bf.name, "")
 
   def testRequestedDType(self):
     """Test if requested dtype is honored in the getter.