class_docstr: Embeddings mapping based on a Variational AutoEncoder (VAE).
  
  This class generates clean embeddings from the obfuscated ones using a VAE.
  More specifically, the encoder architecture generates a mean and a log
  variance for the latent normal distribution, the components of which are
  uncorrelated. These are then used to generate samples for the decoder.
  
  Both the encoder and decoder architectures are based on MLPs.
  
  Attributes:
    encoder: VAE encoder, defined as an MLP.
    decoder: VAE decoder, defined as an MLP.
    encoder_mean: Layer encoding the mean of the latent normal distribution.
    encoder_logvar: Layer encoding the log variance of the latent normal
      distribution.
class_docstr_tok: ["Embeddings","mapping","based","on","a","Variational","AutoEncoder","(","VAE",")",".","This","class","generates","clean","embeddings","from","the","obfuscated","ones","using","a","VAE",".","More","specifically",",","the","encoder","architecture","generates","a","mean","and","a","log","variance","for","the","latent","normal","distribution",",","the","components","of","which","are","uncorrelated",".","These","are","then","used","to","generate","samples","for","the","decoder",".","Both","the","encoder","and","decoder","architectures","are","based","on","MLPs",".","Attributes",":","encoder",":","VAE","encoder",",","defined","as","an","MLP",".","decoder",":","VAE","decoder",",","defined","as","an","MLP",".","encoder_mean",":","Layer","encoding","the","mean","of","the","latent","normal","distribution",".","encoder_logvar",":","Layer","encoding","the","log","variance","of","the","latent","normal","distribution","."]
code: def call(
      self,
      inputs: tf.Tensor,  # pytype: disable=signature-mismatch
      training: bool,
  ) -> Tuple[tf.Tensor, tf.Tensor, tf.Tensor]:
      x = self.encoder(inputs)
      z_mean = self.encoder_mean(x)
      z_log_var = self.encoder_logvar(x)
  
      # During training, generate samples normally.
      if training:
          sample = tf.keras.backend.random_normal(shape=z_mean.shape)
      # During testing, use the means of the distribution to generate
      # representations.
      else:
          sample = 0
      y = z_mean + tf.exp(z_log_var) * sample
      y = self.decoder(y)
      return y, z_mean, z_log_var
  
imports: import abc
  from typing import Union, Tuple, Sequence, Optional
  import tensorflow
  import tensorflow_hub
label_desc: Use image node_id 2 for calling the VAEEmbeddingMapper obj's underlying member method code with example usage: obj.call(inputs, training) and returns: y,  z_mean,  z_log_var