Merge pull request #38717 from Intel-tensorflow:cuixiaom/bfloat16_namescope_pr
PiperOrigin-RevId: 307832106 Change-Id: I885bfcbad6a47494c01b6988f8c7ea709fb29ab5
This commit is contained in:
commit
b0c3e7377c
@ -76,5 +76,5 @@ def bfloat16_scope():
|
|||||||
This enables variables to be read as bfloat16 type when using get_variable.
|
This enables variables to be read as bfloat16 type when using get_variable.
|
||||||
"""
|
"""
|
||||||
with variable_scope.variable_scope(
|
with variable_scope.variable_scope(
|
||||||
'', custom_getter=_get_custom_getter()) as varscope:
|
'bfloat16', custom_getter=_get_custom_getter()) as varscope:
|
||||||
yield varscope
|
yield varscope
|
||||||
|
@ -31,7 +31,7 @@ class BFloat16ScopeTest(test.TestCase):
|
|||||||
def testScopeName(self):
|
def testScopeName(self):
|
||||||
"""Test if name for the variable scope is propagated correctly."""
|
"""Test if name for the variable scope is propagated correctly."""
|
||||||
with bfloat16.bfloat16_scope() as bf:
|
with bfloat16.bfloat16_scope() as bf:
|
||||||
self.assertEqual(bf.name, "")
|
self.assertEqual(bf.name, "bfloat16")
|
||||||
|
|
||||||
@test_util.run_deprecated_v1
|
@test_util.run_deprecated_v1
|
||||||
def testRequestedDType(self):
|
def testRequestedDType(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user