Merge pull request #38717 from Intel-tensorflow:cuixiaom/bfloat16_namescope_pr

PiperOrigin-RevId: 307832106
Change-Id: I885bfcbad6a47494c01b6988f8c7ea709fb29ab5
This commit is contained in:
TensorFlower Gardener 2020-04-22 09:31:18 -07:00
commit b0c3e7377c
2 changed files with 2 additions and 2 deletions

View File

@ -76,5 +76,5 @@ def bfloat16_scope():
This enables variables to be read as bfloat16 type when using get_variable.
"""
with variable_scope.variable_scope(
'', custom_getter=_get_custom_getter()) as varscope:
'bfloat16', custom_getter=_get_custom_getter()) as varscope:
yield varscope

View File

@ -31,7 +31,7 @@ class BFloat16ScopeTest(test.TestCase):
def testScopeName(self):
"""Test if name for the variable scope is propagated correctly."""
with bfloat16.bfloat16_scope() as bf:
self.assertEqual(bf.name, "")
self.assertEqual(bf.name, "bfloat16")
@test_util.run_deprecated_v1
def testRequestedDType(self):