From 69465b017eb76d210bda3b752aabf792ce52609e Mon Sep 17 00:00:00 2001 From: Sourabh Bajaj Date: Fri, 27 Apr 2018 13:01:44 -0700 Subject: [PATCH] Remove scope name from bfloat16 PiperOrigin-RevId: 194580957 --- tensorflow/contrib/tpu/python/tpu/bfloat16.py | 2 +- tensorflow/contrib/tpu/python/tpu/bfloat16_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/contrib/tpu/python/tpu/bfloat16.py b/tensorflow/contrib/tpu/python/tpu/bfloat16.py index 5e49af6..fa74f65 100644 --- a/tensorflow/contrib/tpu/python/tpu/bfloat16.py +++ b/tensorflow/contrib/tpu/python/tpu/bfloat16.py @@ -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 diff --git a/tensorflow/contrib/tpu/python/tpu/bfloat16_test.py b/tensorflow/contrib/tpu/python/tpu/bfloat16_test.py index 48a01c7..26fd3768 100644 --- a/tensorflow/contrib/tpu/python/tpu/bfloat16_test.py +++ b/tensorflow/contrib/tpu/python/tpu/bfloat16_test.py @@ -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. -- 2.7.4