Local cost function - hybrid neural networks

Hi @CatalinaAlbornoz,

I did add the above line you suggested but I still get the following error:

ValueError: Input 0 of layer dense_4 is incompatible with the layer: : expected min_ndim=2, found ndim=1. Full shape received: (16,)

Overview of my model resulting in the above error:
input shape = 12 which is then passed on to 12-qubit parametrized circuit. Only the first qubit (q0) is measured and then passed on to 10-neuron classical layer.

Looking at the error above, I thought may be measuring two qubits would resolve the issue. But in the same setting when I measure two qubits (q0 and q1), I get the following error:
ValueError: Input 0 of layer dense_5 is incompatible with the layer: expected axis -1 of input shape to have value 12 but received input with shape (16, 2)

PS: 16 is the batch size i am using.

Thanks