IndexError: tuple index out of range in Quantum LSTM Hybrid Model
Hi @sleepingcat4, Thanks for reporting the issue!

I was able to replicate the issue in Colab using Tensorflow 2.7, please find the gist [here](https://colab.sandbox.google.com/gist/synandi/dbecb1235104ecef478b0c809a58d1f4/60385_error.ipynb). 

I have reshaped `weights` to have shape `(n_layers, n_qubits, 3)` in the quantum_layer. This is because `qml.StronglyEntanglingLayers` expects a tensor of shape `(n_layers, n_qubits, 3)` as input for the weights. Kindly refer to this [doc](https://docs.pennylane.ai/en/stable/code/api/pennylane.StronglyEntanglingLayers.html). Please check the working code [here](https://colab.sandbox.google.com/gist/synandi/34bffecda57235b112c6f2fd86f90efd/60385.ipynb). Thank you! Thank you! I followed the pennylane documentation to create VQC, that's why, I missed that reshaping part. Tensorflow is my favourite, looking forward to create more stuff ^^ Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60385">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60385">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

2.7.0

### Custom Code

Yes

### OS Platform and Distribution

Windows 11

### Mobile device

_No response_

### Python version

3.8

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

I have created a simple VQC and combined it with Classsical Tensorflow layers using KerasLayer. My model compiles perfectly but when I try to train it using toy data, it returns a input_shape() error. 

I have already tried a bunch of tricks to change the shape of my data to prevent the error but it creates more error or same error presists. 

**Packages:**

1. PennyLane
2. Tensorflow
3. Numpy

It'll be significantly appreciated if someone can help me. 

### Standalone code to reproduce the issue

```shell
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'


import tensorflow as tf
import numpy as np
import pennylane as qml
from pennylane.templates.layers import StronglyEntanglingLayers

# Define the quantum circuit
n_qubits = 4
dev = qml.device("default.qubit", wires=n_qubits)

@qml.qnode(dev)
def quantum_layer(inputs, weights):
    print("Inputs shape:", inputs.shape)
    print("Weights shape:", weights.shape)
    # weights=weights[0]
    qml.StronglyEntanglingLayers(weights, wires=range(n_qubits))
    return [qml.expval(qml.PauliZ(i)) for i in range(n_qubits)]

n_layers = 2
features=1
timesteps = 10 

weight_shapes = {"weights": (n_layers, n_qubits)}
# Define the neural network model
def create_model():
    model = tf.keras.Sequential([
        tf.keras.layers.LSTM(4, input_shape=(timesteps, features)),
        tf.keras.layers.Reshape((1, 4)),
        tf.keras.layers.Lambda(lambda x: x[:, -1, :]),
        qml.qnn.KerasLayer(quantum_layer, weight_shapes, output_dim=n_qubits),
        tf.keras.layers.Dense(16, activation='relu'),
        tf.keras.layers.Dense(1, activation='sigmoid')
    ])
    return model

# Compile the model and print the summary
model = create_model()
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
model.summary()

# Define the toy dataset
X = np.random.rand(100, timesteps, features)
y = np.random.randint(0, 2, size=(100, 1))

# Train the model
model.fit(X, y, epochs=10, batch_size=10)
```


### Relevant log output

```shell
Traceback (most recent call last):
  File "f:/CS/QLSTM/qml.py", line 49, in <module>
    model.fit(X, y, epochs=10, batch_size=10)
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\keras\utils\traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pennylane\qnn\keras.py", line 302, in call
    reconstructor.append(self.call(x))
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pennylane\qnn\keras.py", line 305, in call
    return self._evaluate_qnode(inputs)
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pennylane\qnn\keras.py", line 320, in _evaluate_qnode
    return self.qnode(**kwargs)
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pennylane\qnode.py", line 842, in __call__
    self.construct(args, kwargs)
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pennylane\qnode.py", line 751, in construct
1, in wrapper
    result = fn(*args, **kwargs)
  File "f:/CS/QLSTM/qml.py", line 19, in quantum_layer
    qml.StronglyEntanglingLayers(weights, wires=range(n_qubits))
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pennylane\templates\layers\strongly_entangling.py", line 143, in __init__
    if shape[2] != 3:
IndexError: Exception encountered when calling layer "keras_layer" (type KerasLayer).

tuple index out of range

Call arguments received:
  • inputs=tf.Tensor(shape=(10, 4), dtype=float32)
```
</details>