Open SSSSSCV opened 3 years ago
Without seeing the code for discriminator_network
we won't be able to diagnose the issue, could you post more? I suspect the main issue is that, to use circuits converted to tensors, discriminator_network
needs to be written in terms of the TensorFlow Quantum layers: https://www.tensorflow.org/quantum/api_docs/python/tfq/layers. Also, to be trainable, the circuits need to have free parameters specified in terms of sympy
variables. I would recommend going through the tutorial: https://www.tensorflow.org/quantum/tutorials/hello_many_worlds, which compares running circuits with raw Cirq and with Tensorflow Quantum.
@zaqqwerty ,Thank your help.I added the code about the discriminator_network
Any updates on this @zaqqwerty ?
This is similar to https://github.com/tensorflow/quantum/issues/712, it doesn't like tensors are parameters for cirq. Any other updates on this issue?
I created a quantum neural network using tensorflow quantum,It's input is a tensor converted by circuit.About this input circuit,I found that if the parameters of the circuit are also specified by tensors, the quantum neural network cannot be trained. The circuit when using normal parameters can make the network train normally
But when I use the following code, the quantum neural network cannot be trained
The discriminator_network