Testing stage: To obtain a point estimate, we follow the common practice in dropout [1]}
to multiply the neurons by the expected values of random dropout masks, which means that we
predict \(y\)  with \(p_{\theta }(y\,|\,x,\bar{z})\) , where \(\bar{z}=\mathbb {E}_{q_{}(z\,|\,x)}[z]\)  under the proposed contextual dropout. When uncertainty estimation is needed, we draw \(K\)  random dropout masks to approximate the posterior predictive distribution of \(y\)  given \(x\)  using
\(\hat{p}(y\,|\,x)=\frac{1}{K}\sum _{k=1}^K p_{\theta }(y\,|\,x,z^{(k)}),\)  where \(z^{(1)},\ldots ,z^{(K)}\stackrel{iid}{\sim }q_{}(z\,|\,x)\) .
