code: def kl_dvg(means, logvars):
      """compute the KL divergence between Gaussian distribution"""
      kl_cost = -0.5 * (
          logvars - tf.square(means) - tf.exp(logvars) + 1.0
      )
      kl_cost = tf.reduce_mean(kl_cost, 0)
  
      return tf.reduce_sum(kl_cost)
  
file_path: texar/examples/vae_text/vae_train.py
imports: import os
  import sys
  import time
  import importlib
  from io import open
  import numpy
  import tensorflow
  import tensorflow_probability
  import texar.tf
label_desc: Use image node_id 1 for calling a global function with example usage: kl_dvg(means, logvars) and returns: tf