Skip to main content
. Author manuscript; available in PMC: 2022 Apr 1.
Published in final edited form as: IEEE Trans Affect Comput. 2019 Mar 15;12(2):306–317. doi: 10.1109/taffc.2019.2905211

Fig. 4.

Fig. 4.

Excerpt of Pyro code that implements a semi-supervised variant of a variational autoencoder, with graphical representation on the right. The latent variable z captures aspects of the face (e.g., shape) that are emotion-irrelevant, while θ parameterizes the distribution Pθ(face|emotion, z). Here, θ are weights in a neural network within the Decoder () function (l. 7). This code builds off Fig. 3 by generating an emotion conditioned on the observed outcome and emotion ratings (l. 3-4), sampling z from its priors (l. 5), and generating a face conditioned on the observed data (l. 6-8).