class_docstr: A parameter retains both constrained and unconstrained representations. If no transform
  is provided, these two values will be the same.  It is often challenging for humans to operate with
  unconstrained parameters, although this is typically easier for the optimiser. For example, a variance cannot be negative, therefore we need a
  positive constraint and it is natural to use constrained values.  A prior can be imposed
  either on the constrained version (default) or on the unconstrained version of the
  parameter.
  
  See `this guide <https://gpflow.github.io/GPflow/develop/notebooks/getting_started/parameters_and_their_optimisation.html#The-Module-and-Parameter-classes>`_
  for an introduction to this class.
  
  :param unconstrained_shape: Declare the shape of the unconstrained / pre-transformed values.
      Useful for setting dynamic shapes.
  :param constrained_shape: Declare the shape of the constrained / transformed values. Useful
      for setting dynamic shapes.
  :param shape: Convenience shortcut for setting both `unconstrained_shape` and
      `constrained_shape` to the same value.
class_docstr_tok: ["A","parameter","retains","both","constrained","and","unconstrained","representations",".","If","no","transform","is","provided",",","these","two","values","will","be","the","same",".","It","is","often","challenging","for","humans","to","operate","with","unconstrained","parameters",",","although","this","is","typically","easier","for","the","optimiser",".","For","example",",","a","variance","can","not","be","negative",",","therefore","we","need","a","positive","constraint","and","it","is","natural","to","use","constrained","values",".","A","prior","can","be","imposed","either","on","the","constrained","version","(","default",")","or","on","the","unconstrained","version","of","the","parameter",".","See","`","this","guide","<","https",":","\/\/gpflow.github.io\/GPflow\/develop\/notebooks\/getting_started\/parameters_and_their_optimisation.html","#","The-Module-and-Parameter-classes",">","`","_","for","an","introduction","to","this","class",".",":","param","unconstrained_shape",":","Declare","the","shape","of","the","unconstrained","\/","pre-transformed","values",".","Useful","for","setting","dynamic","shapes",".",":","param","constrained_shape",":","Declare","the","shape","of","the","constrained","\/","transformed","values",".","Useful","for","setting","dynamic","shapes",".",":","param","shape",":","Convenience","shortcut","for","setting","both","`","unconstrained_shape","`","and","`","constrained_shape","`","to","the","same","value","."]
code: def __init__(
      self,
      value: "TensorData",
      *,
      transform: Optional[Transform] = None,
      prior: Optional[Prior] = None,
      prior_on: Optional[Union[str, PriorOn]] = None,
      trainable: Optional[bool] = None,
      dtype: Optional[DType] = None,
      name: Optional[str] = None,
      unconstrained_shape: Optional[Sequence[Optional[int]]] = None,
      constrained_shape: Optional[Sequence[Optional[int]]] = None,
      shape: Optional[Sequence[Optional[int]]] = None,
  ):
      if transform:
          name = name or transform.name
  
      if isinstance(value, Parameter):
          transform = transform or value.transform
          prior = prior or value.prior
          prior_on = prior_on or value.prior_on
          name = name or value.bijector.name
          trainable = (
              value.trainable if trainable is None else trainable
          )
  
          if dtype:
              tensor_value: TensorType = _cast_to_dtype(value, dtype)
          else:
              tensor_value = value
      else:
          if transform is None:
              transform = tfp.bijectors.Identity()
  
          prior_on = prior_on if prior_on else PriorOn.CONSTRAINED
          trainable = trainable if trainable is not None else True
  
          tensor_value = _cast_to_dtype(value, dtype)
  
      _validate_unconstrained_value(tensor_value, transform, dtype)
  
      if shape is not None:
          assert (
              unconstrained_shape is None
          ), "Cannot set both `shape` and `unconstrained_shape`."
          assert (
              constrained_shape is None
          ), "Cannot set both `shape` and `constrained_shape`."
          unconstrained_shape = shape
          constrained_shape = shape
  
      super().__init__(
          tensor_value,
          transform,
          dtype=tensor_value.dtype,
          trainable=trainable,
          name=name,
          shape=unconstrained_shape,
      )
  
      # TransformedVariable.__init__ doesn't allow us to pass an unconstrained / pre-transformed
      # shape, so we manually override it.
      if constrained_shape is not None:
          self._shape = tf.TensorShape(constrained_shape)
  
      self.prior: Optional[Prior] = prior
      self.prior_on = prior_on
  
imports: from enum import Enum
  from typing import TYPE_CHECKING, Any, List, Optional, Sequence, Tuple, Union
  import numpy
  import tensorflow
  import tensorflow_probability
  from check_shapes import check_shapes
  from typing_extensions import Final
  from .config import default_float, default_summary_fmt
  from .type_flags import GENERIC_NP_ARRAYS, NP_TYPE_CHECKING
label_desc: Use image node_id 1 to create a new Parameter object from inherited base classes: tfp.util with example: obj = Parameter(value)