Another approach consists in directly finding the codebook during the training of the NN, rather than after the training has been done.
The vector quantizer variational AE framework (VQ-VAE), which has been originally proposed in [1]}, can solve this problem. Therefore we decided to use it for our purpose. The codebook for the feedback is learnt during the training of the NN by considering the loss function
\(\mathcal {L}^{\text{vq}} = \Vert H - \hat{H} \Vert _{\mathrm {F}}^2 + \Vert \text{sg}[z_{\text{e}}] - z \Vert _2^2 + \beta \Vert z_{\text{e}} - \text{sg}[z] \Vert _2^2.\) 
