code: def test_two_layer_training(self):
      shape = (128, 3)
      with tfe.protocol.ABY3():
          tfe_model = Sequential()
          tfe_model.add(
              Dense(2, batch_input_shape=shape, activation="sigmoid")
          )
          tfe_model.add(Dense(1))
  
          x = tfe.define_private_variable(np.random.normal(size=shape))
          y = tfe.define_private_variable(
              np.random.normal(size=(shape[0], 1))
          )
  
          loss = tfe.keras.losses.BinaryCrossentropy(from_logits=True)
          optimizer = tfe.keras.optimizers.SGD(learning_rate=0.01)
          tfe_model.compile(optimizer, loss)
          tfe_model(x)
  
          weights0_init = [
              w.read_value().reveal().to_native()
              for w in tfe_model.layers[0].weights
          ]
          weights1_init = [
              w.read_value().reveal().to_native()
              for w in tfe_model.layers[1].weights
          ]
  
          loss = tfe_model.fit_batch(x, y)
  
          weights0_updated = [
              w.read_value().reveal().to_native()
              for w in tfe_model.layers[0].weights
          ]
          weights1_updated = [
              w.read_value().reveal().to_native()
              for w in tfe_model.layers[1].weights
          ]
  
          x_value = x.reveal().to_native()
          y_value = y.reveal().to_native()
  
      plain_model = tf.keras.Sequential()
      plain_model.add(
          tf.keras.layers.Dense(
              2, batch_input_shape=shape, activation="sigmoid"
          )
      )
      plain_model.add(tf.keras.layers.Dense(1))
  
      plain_model.layers[0].set_weights(weights0_init)
      plain_model.layers[1].set_weights(weights1_init)
  
      loss = tf.keras.losses.BinaryCrossentropy(from_logits=True)
      optimizer = tf.keras.optimizers.SGD(learning_rate=0.01)
      plain_model.compile(optimizer=optimizer, loss=loss)
  
      plain_model.fit(x_value, y_value, batch_size=128)
  
      expected_weights0_updated = plain_model.layers[0].weights
      expected_weights1_updated = plain_model.layers[1].weights
  
      for i in range(len(weights0_updated)):
          np.testing.assert_allclose(
              weights0_updated[i],
              expected_weights0_updated[i],
              rtol=1e-3,
              atol=1e-3,
          )
      for i in range(len(weights1_updated)):
          np.testing.assert_allclose(
              weights1_updated[i],
              expected_weights1_updated[i],
              rtol=1e-3,
              atol=1e-3,
          )
  
file_path: tf-encrypted/tf_encrypted/keras/models/sequential_test.py
imports: import unittest
  import numpy
  import tensorflow
  import tf_encrypted
  from tf_encrypted.keras import Sequential
  from tf_encrypted.keras.layers import Dense
label_desc: Use image node_id 1 for calling the TestSequentialABY3 obj's underlying member method code with example usage: obj.test_two_layer_training() without return types