where \(g_{i,j}\)  is a sample drawn from Gumbel distribution [1]} with mean 0 and variance 1.
Note that the \(\exp (.)\)  and \(\log (.)\)  functions are applied element-wise when taking a vector as input.
The parameter \(\tau \)  is called “Softmax temperature”. When \(\tau \rightarrow 0\) , \(G(\mathbf {p}_i)\)  tends to the categorical distribution, but when \(\tau \rightarrow \infty \) , it converges to the uniform distribution [2]}.
There is a trade-off between small temperatures, where sample vectors are close to one-hot but the variance of the gradient is large, and large temperatures, where samples are more uniform but the variance of the gradient is small. We thus consider \(\tau \)  as a hyper-parameter to be optimized.
Finally, the output of the fourth layer, denoted \(\bar{\mathbf {S}}_{\sf {DSA}}\) , is obtained after a row-concatenation of vectors \(G(\mathbf {p}_i) \; \forall i \in [1,N_{\sf {T}}]\) . The analog precoder \(\bar{\mathbf {A}}_{q}\)  is obtained from (REF ), where \(\mathbf {S}\)  is replaced by \(\bar{\mathbf {S}}_{\sf {DSA}}\) , and the loss function (REF ) can be computed. For the power constraint, we assumed a fixed transmit power for each RF chain. Then, the power of each RF chain is split equally among the antennas it is connected to. Furthermore, the total transmit power by AP and DP is normalized to satisfy the power constraint in (REF ).
