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 mode(self, *, parameters, independent):
      probability = parameters["probability"]
  
      # Distribution parameter summaries
      dependencies = list()
      if not independent:
  
          def fn_summary():
              axis = range(self.action_spec.rank + 1)
              return tf.math.reduce_mean(
                  input_tensor=probability, axis=axis
              )
  
          name = "distributions/" + self.name + "-probability"
          dependencies.extend(
              self.summary(
                  label="distribution",
                  name=name,
                  data=fn_summary,
                  step="timesteps",
              )
          )
  
      # Distribution parameter tracking
      def fn_tracking():
          return tf.math.reduce_mean(input_tensor=probability, axis=0)
  
      dependencies.extend(
          self.track(
              label="distribution", name="probability", data=fn_tracking
          )
      )
  
      with tf.control_dependencies(control_inputs=dependencies):
          return tf.greater_equal(
              x=probability,
              y=tf_util.constant(value=0.5, dtype="float"),
          )
  
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 5 for calling the Bernoulli obj's underlying member method code with example usage: obj.mode() and returns: tf, tf, tf