def test_setter_update(self):
    'Test the prototyped setter method.'
    input_data = keras.Input(shape=(1,))
    layer = AddingPreprocessingLayer()
    output = layer(input_data)
    model = keras.Model(input_data, output)
    model._run_eagerly = testing_utils.should_run_eagerly()
    layer.set_total(15)
    self.assertAllEqual([[16], [17], [18]], model.predict([1.0, 2.0, 3.0]))
Test the prototyped setter method.
def test_setter_update(self):
    
    input_data = keras.Input(shape=(1,))
    layer = AddingPreprocessingLayer()
    output = layer(input_data)
    model = keras.Model(input_data, output)
    model._run_eagerly = testing_utils.should_run_eagerly()
    layer.set_total(15)
    self.assertAllEqual([[16], [17], [18]], model.predict([1.0, 2.0, 3.0]))