def test_adapt_sets_input_shape_rank(self):
    "Check that `.adapt()` sets the `input_shape`'s rank."
    adapt_dataset = np.array([[[1.0, 2.0]], [[3.0, 4.0]], [[5.0, 6.0]]], dtype=np.float32)
    layer = AddingPreprocessingLayer()
    layer.adapt(adapt_dataset)
    input_dataset = np.array([[[1.0, 2.0], [3.0, 4.0]], [[3.0, 4.0], [5.0, 6.0]]], dtype=np.float32)
    layer(input_dataset)
    model = keras.Sequential([layer])
    self.assertTrue(model.built)
    self.assertEqual(model.input_shape, (None, None, None))
Check that `.adapt()` sets the `input_shape`'s rank.
def test_adapt_sets_input_shape_rank(self):
    
    adapt_dataset = np.array([[[1.0, 2.0]], [[3.0, 4.0]], [[5.0, 6.0]]], dtype=np.float32)
    layer = AddingPreprocessingLayer()
    layer.adapt(adapt_dataset)
    input_dataset = np.array([[[1.0, 2.0], [3.0, 4.0]], [[3.0, 4.0], [5.0, 6.0]]], dtype=np.float32)
    layer(input_dataset)
    model = keras.Sequential([layer])
    self.assertTrue(model.built)
    self.assertEqual(model.input_shape, (None, None, None))