class_docstr: Beta distribution, for bounded continuous actions (specification key: `beta`).
  
  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 parametrize(self, *, x, conditions):
      # Softplus to ensure alpha and beta >= 1
      one = tf_util.constant(value=1.0, dtype="float")
      log_epsilon = tf_util.constant(
          value=np.log(util.epsilon), dtype="float"
      )
      shape = (-1,) + self.action_spec.shape
  
      # Alpha
      alpha = self.alpha.apply(x=x)
      # epsilon < 1.0, hence negative
      alpha = tf.clip_by_value(
          t=alpha,
          clip_value_min=log_epsilon,
          clip_value_max=-log_epsilon,
      )
      alpha = (
          tf.math.exp(x=alpha) + one
      )  # tf.math.softplus(features=beta) ???
      if self.input_spec.rank == 1:
          alpha = tf.reshape(tensor=alpha, shape=shape)
  
      # Beta
      beta = self.beta.apply(x=x)
      # epsilon < 1.0, hence negative
      beta = tf.clip_by_value(
          t=beta,
          clip_value_min=log_epsilon,
          clip_value_max=-log_epsilon,
      )
      beta = (
          tf.math.exp(x=beta) + one
      )  # tf.math.softplus(features=beta) ???
      if self.input_spec.rank == 1:
          beta = tf.reshape(tensor=beta, shape=shape)
  
      # Alpha + Beta
      alpha_beta = alpha + beta  # > 2.0 so no +epsilon required
  
      # Log norm
      log_norm = (
          tf.math.lgamma(x=alpha)
          + tf.math.lgamma(x=beta)
          - tf.math.lgamma(x=alpha_beta)
      )
  
      return TensorDict(
          alpha=alpha,
          beta=beta,
          alpha_beta=alpha_beta,
          log_norm=log_norm,
      )
  
file_path: tensorforce/tensorforce/core/distributions/beta.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 4 for calling the Beta obj's underlying member method code with example usage: obj.parametrize() and returns: TensorDict