class_docstr: Categorical distribution, for discrete integer actions (specification key: `categorical`).
  
  Args:
      temperature_mode ("predicted" | "global"): Whether to predict the temperature via a linear
          transformation of the state embedding, or to parametrize the temperature by a separate
          set of trainable weights
          (<span style="color:#00C000"><b>default</b></span>: default temperature of 1).
      skip_linear (bool): Whether to not add the implicit linear logits layer, requires suitable
          network output shape according to action space, not compatible with temperature_mode
          (<span style="color:#00C000"><b>default</b></span>: false).
      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: ["Categorical","distribution",",","for","discrete","integer","actions","(","specification","key",":","`","categorical","`",")",".","Args",":","temperature_mode","(","``","predicted","''","|","``","global","''",")",":","Whether","to","predict","the","temperature","via","a","linear","transformation","of","the","state","embedding",",","or","to","parametrize","the","temperature","by","a","separate","set","of","trainable","weights","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","default","temperature","of","1",")",".","skip_linear","(","bool",")",":","Whether","to","not","add","the","implicit","linear","logits","layer",",","requires","suitable","network","output","shape","according","to","action","space",",","not","compatible","with","temperature_mode","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","false",")",".","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):
      probabilities1, logits1 = parameters1.get(
          ("probabilities", "logits")
      )
      logits2 = parameters2["logits"]
  
      log_prob_ratio = logits1 - logits2
  
      return tf.reduce_sum(
          input_tensor=(probabilities1 * log_prob_ratio), axis=-1
      )
  
file_path: tensorforce/tensorforce/core/distributions/categorical.py
imports: import numpy
  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 Categorical obj's underlying member method code with example usage: obj.kl_divergence() and returns: tf