class_docstr: Constant hyperparameter  (specification key: `constant`).
  
  Args:
      value (float | int | bool): Constant hyperparameter value
          (<span style="color:#C00000"><b>required</b></span>).
      name (string): <span style="color:#0000C0"><b>internal use</b></span>.
      dtype (type): <span style="color:#0000C0"><b>internal use</b></span>.
      min_value (dtype-compatible value): <span style="color:#0000C0"><b>internal use</b></span>.
      max_value (dtype-compatible value): <span style="color:#0000C0"><b>internal use</b></span>.
class_docstr_tok: ["Constant","hyperparameter","(","specification","key",":","`","constant","`",")",".","Args",":","value","(","float","|","int","|","bool",")",":","Constant","hyperparameter","value","(","<","span","style=","''","color",":","#","C00000","''",">","<","b",">","required","<","\/b",">","<","\/span",">",")",".","name","(","string",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","dtype","(","type",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","min_value","(","dtype-compatible","value",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","max_value","(","dtype-compatible","value",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def __init__(
      self,
      value,
      *,
      name=None,
      dtype=None,
      min_value=None,
      max_value=None,
  ):
      if isinstance(value, bool):
          if dtype != "bool":
              raise TensorforceError.dtype(
                  name="Constant", argument="value", dtype=type(value)
              )
      elif isinstance(value, int):
          if dtype != "int":
              raise TensorforceError.dtype(
                  name="Constant", argument="value", dtype=type(value)
              )
      elif isinstance(value, float):
          if dtype != "float":
              raise TensorforceError.dtype(
                  name="Constant", argument="value", dtype=type(value)
              )
      else:
          raise TensorforceError.unexpected()
      if min_value is not None and value < min_value:
          raise TensorforceError.value(
              name="Constant",
              argument="value",
              value=value,
              hint="< {} lower bound".format(min_value),
          )
      if max_value is not None and value > max_value:
          raise TensorforceError.value(
              name="Constant",
              argument="value",
              value=value,
              hint="> {} upper bound".format(max_value),
          )
  
      self.constant_value = value
  
      super().__init__(
          name=name,
          dtype=dtype,
          min_value=min_value,
          max_value=max_value,
      )
  
file_path: tensorforce/tensorforce/core/parameters/constant.py
imports: from tensorforce import TensorforceError
  from tensorforce.core import tf_function, tf_util
  from tensorforce.core.parameters import Parameter
label_desc: Use image node_id 1 to create a new Constant object from inherited base classes: Parameter with example: obj = Constant(value)