Research Article
An Image Classification Algorithm Based on Hybrid Quantum Classical Convolutional Neural Network
Algorithm 1
HQCCNN classification algorithm.
| Input: classical image dataset | 1 | preparing quantum state, the training set and the testing set are obtained. | 2 | constructing hybrid quantum-classical convolutional neural network | 3 | setting the values for batchsize, epoch, and learning rate | 4 | for each epoch do | 5 | for each batchsize do | 6 | quantum system perform unitary transformation , | 7 | measuring, inputting into the classical fully connected layer for further processing, | 8 | calculating the loss value and gradient, updating the parameters based on the gradient and learning rate. | 9 | end for | 10 | validating testing set | 11 | end for | | Output: each image’s class |
|