Quantum convolution neural network using Keras

Hey @b0976960890! Welcome to the forum!

I think this issue is similar to this forum post: Data re-uploading impelementation in hybrid NN with keras layer - #6 by Kuma-quant

I think what’s happening is that there is / are non-tensorflow arithmetic / operations present in your call function (e.g., appending to lists). When using Keras with QNodes, you will need to ensure that all array/tensor manipulations use TensorFlow. Otherwise, Keras will not be able to differentiate your QNode.

Let me know if this helps!

1 Like