class_docstr: Combines the encoder and decoder into an end-to-end model for training.
class_docstr_tok: ["Combines","the","encoder","and","decoder","into","an","end-to-end","model","for","training","."]
code: def call(self, inputs):
      z_mean, z_log_var, z = self.encoder(inputs)
      reconstructed = self.decoder(z)
      # Add KL divergence regularization loss.
      kl_loss = -0.5 * ops.mean(
          z_log_var - ops.square(z_mean) - ops.exp(z_log_var) + 1
      )
      self.add_loss(kl_loss)
      return reconstructed
  
imports: import numpy
  import keras
  from keras import ops
  from keras import layers
label_desc: Use image node_id 2 for calling the VariationalAutoEncoder obj's underlying member method code with example usage: obj.call(inputs) and returns: reconstructed