message: Fix deferred_sequential_test
  Summary:
  TF2.5 Only
  Fix linter
  Reviewers: georgep, #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved
  Maniphest Tasks: T51852
diff: @@ -134,7 +134,10 @@ class TestDeferredSequential(keras_parameterized.TestCase):
  path = os.path.join(self.get_temp_dir(), 'model_path')
  model.save(path)
  new_model = keras.models.load_model(path)
  - for layer1, layer2 in zip(model._layers, new_model._layers): # pylint:disable=protected-access
  + model_layers = model._flatten_layers(include_self=True, recursive=False) # pylint:disable=protected-access
  + new_model_layers = new_model._flatten_layers( # pylint:disable=protected-access
  + include_self=True, recursive=False)
  + for layer1, layer2 in zip(model_layers, new_model_layers):
  self.assertEqual(layer1.name, layer2.name)
  for w1, w2 in zip(layer1.weights, layer2.weights):
  self.assertAllClose(w1, w2)
  @@ -150,7 +153,10 @@ class TestDeferredSequential(keras_parameterized.TestCase):
  path = os.path.join(self.get_temp_dir(), 'model_path.h5')
  model.save(path)
  new_model = keras.models.load_model(path)
  - for layer1, layer2 in zip(model._layers, new_model._layers): # pylint:disable=protected-access
  + model_layers = model._flatten_layers(include_self=True, recursive=False) # pylint:disable=protected-access
  + new_model_layers = new_model._flatten_layers( # pylint:disable=protected-access
  + include_self=True, recursive=False)
  + for layer1, layer2 in zip(model_layers, new_model_layers):
  self.assertEqual(layer1.name, layer2.name)
  for w1, w2 in zip(layer1.weights, layer2.weights):
  self.assertAllClose(w1, w2)
  