Remove unused code in tests.

PiperOrigin-RevId: 337447002
Change-Id: I61c4dedb3cb0c5438b1602ab57c091d018f91fc1
This commit is contained in:
Scott Zhu 2020-10-15 22:26:19 -07:00 committed by TensorFlower Gardener
parent 3ba72a8d69
commit 52a388a6b7

View File

@ -27,7 +27,6 @@ from tensorflow.python.eager import backprop
from tensorflow.python.eager import context
from tensorflow.python.eager import def_function
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import test_util
from tensorflow.python.keras import combinations
@ -460,16 +459,6 @@ class CheckpointingTests(keras_parameterized.TestCase):
self.evaluate(root.save_counter))
# pylint: enable=cell-var-from-loop
def _get_checkpoint_name(self, name):
root = module.Module()
trackable_utils.add_variable(
root, name=name, shape=[1, 2], dtype=dtypes.float64)
(named_variable,), _, _ = trackable_utils._serialize_object_graph(
root, saveables_cache=None)
with ops.name_scope_v2("root/" + named_variable.name):
pass # Make sure we can use this as an op name if we prefix it.
return named_variable.name
@combinations.generate(combinations.combine(mode=["eager"]))
def testAnonymousVarsInInit(self):