Repository: keras-team/keras
Issue: keras.layers.Bidirectional is missing argument "states", which is defined for keras.layers.RNN

**System information**.
- Have I written custom code (as opposed to using a stock example script provided in Keras): no
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS
- TensorFlow installed from (source or binary): PYPI
- TensorFlow version (use command below): 2.11.0
- Python version: 3.9

**Describe the problem**.

The `reset_states(self)` method of `keras.layers.Bidirectional` (https://github.com/keras-team/keras/blob/master/keras/layers/rnn/bidirectional.py#L448) is missing the `states` argument, which is defined for `keras.layers.RNN` (https://github.com/keras-team/keras/blob/master/keras/layers/rnn/base_rnn.py#L846).

**Describe the current behavior**.
User cannot pass the states to bidirectional layers using `reset_states()`

**Describe the expected behavior**.
Users should be able to pass states to bidirectional layers ;)

**[Contributing](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md)**.

- Do you want to contribute a PR? (yes/no): yes
- If yes, please read [this page](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md) for instructions
- Briefly describe your candidate solution(if contributing):

Something like this:
```python
def reset_states(self, states=None):
   forward_state, backward_state = None, None
   if states is not None:
       assert isinstance(states, (list, tuple))
       cnt = len(states)
       assert cnt % 2 == 0
       cnt = cnt // 2
       forward_state, backward_state = states[:cnt], states[cnt:]
   self.forward_layer.reset_states(forward_state)
   self.backward_layer.reset_states(backward_state)
```

Changed files:
keras/layers/rnn/bidirectional_test.py, keras/layers/rnn/bidirectional.py

diff --git a/keras/layers/rnn/bidirectional.py b/keras/layers/rnn/bidirectional.py
index aefe15a9af..f5234f27e8 100644
--- a/keras/layers/rnn/bidirectional.py
+++ b/keras/layers/rnn/bidirectional.py
@@ -446,9 +446,24 @@ class Bidirectional(Wrapper):
             return [output] + states
         return output
 
-    def reset_states(self):
-        self.forward_layer.reset_states()
-        self.backward_layer.reset_states()
+    def reset_states(self, states=None):
+        if not self.stateful:
+            raise AttributeError("Layer must be stateful.")
+
+        if states is None:
+            self.forward_layer.reset_states()
+            self.backward_layer.reset_states()
+        else:
+            if not isinstance(states, (list, tuple)):
+                raise ValueError(
+                    "Unrecognized value for `states`. "
+                    f"Received: {states}"
+                    "Expected `states` to be list or tuple"
+                )
+
+            half = len(states) // 2
+            self.forward_layer.reset_states(states[:half])
+            self.backward_layer.reset_states(states[half:])
 
     def build(self, input_shape):
         with backend.name_scope(self.forward_layer.name):
diff --git a/keras/layers/rnn/bidirectional_test.py b/keras/layers/rnn/bidirectional_test.py
index caf3528466..c10ffb3c47 100644
--- a/keras/layers/rnn/bidirectional_test.py
+++ b/keras/layers/rnn/bidirectional_test.py
@@ -1020,6 +1020,46 @@ class BidirectionalTest(tf.test.TestCase, parameterized.TestCase):
         self.assertAllClose(output1, output3)
         self.assertNotAllClose(output1, output2)
 
+    def test_reset_states(self):
+        ref_state = np.random.rand(1, 3).astype(np.float32)
+
+        # build model
+        inp = keras.Input(batch_shape=[1, 2, 3])
+
+        stateful = keras.layers.SimpleRNN(units=3, stateful=True)
+        stateless = keras.layers.SimpleRNN(units=3, stateful=False)
+
+        bid_stateless = keras.layers.Bidirectional(stateless)
+        bid_stateful = keras.layers.Bidirectional(stateful)
+
+        # required to correctly initialize the state in the layers
+        _ = keras.Model(
+            inp,
+            [
+                bid_stateless(inp),
+                bid_stateful(inp),
+            ],
+        )
+
+        with self.assertRaisesRegex(
+            AttributeError,
+            "Layer must be stateful.",
+        ):
+            bid_stateless.reset_states()
+
+        with self.assertRaisesRegex(AttributeError, "Layer must be stateful."):
+            bid_stateless.reset_states([])
+
+        bid_stateful.reset_states()
+        bid_stateful.reset_states([ref_state, ref_state])
+
+        with self.assertRaisesRegex(
+            ValueError,
+            "Unrecognized value for `states`. Received: {}Expected `states` "
+            "to be list or tuple",
+        ):
+            bid_stateful.reset_states({})
+
     def test_trainable_parameter_argument(self):
         inp = keras.layers.Input([None, 3])