Thanks for sharing! I managed to get an output from the hybrid network by changing the script from line 100 to:

```
import pennylane as qml
n_qubits = 5
dev = qml.device('default.qubit', wires=n_qubits)
@qml.qnode(dev)
def quantum_classifier(inputs, weights):
qml.templates.AngleEmbedding(inputs, wires=range(n_qubits))
qml.templates.StronglyEntanglingLayers(weights, wires=range(n_qubits))
return qml.expval(qml.PauliZ(0))
weight_shapes = {"weights": (2, n_qubits, 3)}
qlayer = qml.qnn.KerasLayer(quantum_classifier, weight_shapes, output_dim=1)
flat = tf.keras.layers.Flatten()
downsize_layer = tf.keras.layers.Dense(5)
x = downsize_layer(flat(model.output))
outputs = qlayer(x)
hybrid_model = Model(inputs=model.input, outputs=outputs)
import numpy as np
in_data = np.random.random((1, 128, 128, 1))
hybrid_model(in_data)
```

Note that we need to flatten the output of the classical network and shrink it down to a 5-dimensional input for the quantum layer. This could probably be done with a few more fully connected intermediate layers.

However, it’s also important to bear in mind that the quantum layer will add a simulation overhead to your network, due to the overhead of simulating a quantum system. Combined with the size of your classical network and resultant number of parameters (2,161,361), it will take a long time to even perform one optimization step. I’d recommend starting out with a smaller scale model as more of a prototype.