class_docstr: Bernoulli distribution, for binary boolean actions (specification key: `bernoulli`).
  
  Args:
      name (string): <span style="color:#0000C0"><b>internal use</b></span>.
      action_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
      input_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
class_docstr_tok: ["Bernoulli","distribution",",","for","binary","boolean","actions","(","specification","key",":","`","bernoulli","`",")",".","Args",":","name","(","string",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","action_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","input_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def kl_divergence(self, *, parameters1, parameters2):
      true_logit1, false_logit1, probability1 = parameters1.get(
          ("true_logit", "false_logit", "probability")
      )
      true_logit2, false_logit2 = parameters2.get(
          ("true_logit", "false_logit")
      )
  
      true_log_prob_ratio = true_logit1 - true_logit2
      false_log_prob_ratio = false_logit1 - false_logit2
  
      one = tf_util.constant(value=1.0, dtype="float")
  
      return (
          probability1 * true_log_prob_ratio
          + (one - probability1) * false_log_prob_ratio
      )
  
file_path: tensorforce/tensorforce/core/distributions/bernoulli.py
imports: import tensorflow
  from tensorforce import TensorforceError, util
  from tensorforce.core import layer_modules, TensorDict, TensorSpec, TensorsSpec, tf_function, tf_util
  from tensorforce.core.distributions import Distribution
label_desc: Use image node_id 9 for calling the Bernoulli obj's underlying member method code with example usage: obj.kl_divergence() and returns: unknown