class_docstr: The Generalized Normal distribution.
  
  The Generalized Normal (or Generalized Gaussian) generalizes the Normal
  distribution with an additional shape parameter. It is parameterized by
  location `loc`, scale `scale` and shape `power`.
  
  #### Mathematical details
  
  The probability density function (pdf) is,
  
  ```none
  pdf(x; loc, scale, power) = 1 / (2 * scale * Gamma(1 + 1 / power)) *
                             exp(-(|x - loc| / scale) ^ power)
  ```
  where `loc` is the mean, `scale` is the scale, and,  `power` is the shape
  parameter. If the power is above two, the distribution becomes platykurtic.
  A power equal to two results in a Normal distribution. A power smaller than
  two produces a leptokurtic (heavy-tailed) distribution. Mean and scale behave
  the same way as in the equivalent Normal distribution.
  
  See
  https://en.wikipedia.org/w/index.php?title=Generalized_normal_distribution&oldid=954254464
  for the definitions used here, including CDF, variance and entropy. See
  https://sccn.ucsd.edu/wiki/Generalized_Gaussian_Probability_Density_Function
  for the sampling method used here.
  
  #### Examples
  
  ```python
  import tensorflow_probability as tfp
  tfd = tfp.distributions
  
  dist = tfd.GeneralizedNormal(loc=3.0, scale=2.0, power=1.0)
  dist2 = tfd.GeneralizedNormal(loc=0, scale=[3.0, 4.0], power=[[2.0], [3.0]])
  ```
class_docstr_tok: ["The","Generalized","Normal","distribution",".","The","Generalized","Normal","(","or","Generalized","Gaussian",")","generalizes","the","Normal","distribution","with","an","additional","shape","parameter",".","It","is","parameterized","by","location","`","loc","`",",","scale","`","scale","`","and","shape","`","power","`",".","#","#","#","#","Mathematical","details","The","probability","density","function","(","pdf",")","is",",","``","`","none","pdf","(","x",";","loc",",","scale",",","power",")","=","1","\/","(","2","*","scale","*","Gamma","(","1","+","1","\/","power",")",")","*","exp","(","-","(","|x","-","loc|","\/","scale",")","^","power",")","``","`","where","`","loc","`","is","the","mean",",","`","scale","`","is","the","scale",",","and",",","`","power","`","is","the","shape","parameter",".","If","the","power","is","above","two",",","the","distribution","becomes","platykurtic",".","A","power","equal","to","two","results","in","a","Normal","distribution",".","A","power","smaller","than","two","produces","a","leptokurtic","(","heavy-tailed",")","distribution",".","Mean","and","scale","behave","the","same","way","as","in","the","equivalent","Normal","distribution",".","See","https",":","\/\/en.wikipedia.org\/w\/index.php","?","title=Generalized_normal_distribution","&","oldid=954254464","for","the","definitions","used","here",",","including","CDF",",","variance","and","entropy",".","See","https",":","\/\/sccn.ucsd.edu\/wiki\/Generalized_Gaussian_Probability_Density_Function","for","the","sampling","method","used","here",".","#","#","#","#","Examples","``","`","python","import","tensorflow_probability","as","tfp","tfd","=","tfp.distributions","dist","=","tfd.GeneralizedNormal","(","loc=3.0",",","scale=2.0",",","power=1.0",")","dist2","=","tfd.GeneralizedNormal","(","loc=0",",","scale=","[","3.0",",","4.0","]",",","power=","[","[","2.0","]",",","[","3.0","]","]",")","``","`"]
docstr: Construct Generalized Normal distributions.
  
  The Generalized Normal is parametrized with mean `loc`, scale
  `scale` and shape parameter `power`. The parameters must be shaped
  in a way that supports broadcasting (e.g. `loc + scale` is a valid
  operation).
  
  Args:
    loc: Floating point tensor; the means of the distribution(s).
    scale: Floating point tensor; the scale of the
      distribution(s). Must contain only positive values.
    power: Floating point tensor; the shape parameter of the distribution(s).
      Must contain only positive values. `loc`, `scale` and `power` must have
      compatible shapes for broadcasting.
    validate_args: Python `bool`, default `False`. When `True` distribution
      parameters are checked for validity despite possibly degrading runtime
      performance. When `False` invalid inputs may silently render incorrect
      outputs.
    allow_nan_stats: Python `bool`, default `True`. When `True`,
      statistics (e.g., mean, mode, variance) use the value "`NaN`" to
      indicate the result is undefined. When `False`, an exception is raised
      if one or more of the statistic's batch members are undefined.
    name: Python `str` name prefixed to Ops created by this class.
  
  Raises:
    TypeError: if `loc`, `scale`, and `power` have different `dtype`.
docstr_tok: ["Construct","Generalized","Normal","distributions",".","The","Generalized","Normal","is","parametrized","with","mean","`","loc","`",",","scale","`","scale","`","and","shape","parameter","`","power","`",".","The","parameters","must","be","shaped","in","a","way","that","supports","broadcasting","(","e.g",".","`","loc","+","scale","`","is","a","valid","operation",")",".","Args",":","loc",":","Floating","point","tensor",";","the","means","of","the","distribution","(","s",")",".","scale",":","Floating","point","tensor",";","the","scale","of","the","distribution","(","s",")",".","Must","contain","only","positive","values",".","power",":","Floating","point","tensor",";","the","shape","parameter","of","the","distribution","(","s",")",".","Must","contain","only","positive","values",".","`","loc","`",",","`","scale","`","and","`","power","`","must","have","compatible","shapes","for","broadcasting",".","validate_args",":","Python","`","bool","`",",","default","`","False","`",".","When","`","True","`","distribution","parameters","are","checked","for","validity","despite","possibly","degrading","runtime","performance",".","When","`","False","`","invalid","inputs","may","silently","render","incorrect","outputs",".","allow_nan_stats",":","Python","`","bool","`",",","default","`","True","`",".","When","`","True","`",",","statistics","(","e.g.",",","mean",",","mode",",","variance",")","use","the","value","``","`","NaN","`","``","to","indicate","the","result","is","undefined",".","When","`","False","`",",","an","exception","is","raised","if","one","or","more","of","the","statistic","'s","batch","members","are","undefined",".","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class",".","Raises",":","TypeError",":","if","`","loc","`",",","`","scale","`",",","and","`","power","`","have","different","`","dtype","`","."]
code: def __init__(
      self,
      loc,
      scale,
      power,
      validate_args=False,
      allow_nan_stats=True,
      name="GeneralizedNormal",
  ):
      """Construct Generalized Normal distributions.
  
      The Generalized Normal is parametrized with mean `loc`, scale
      `scale` and shape parameter `power`. The parameters must be shaped
      in a way that supports broadcasting (e.g. `loc + scale` is a valid
      operation).
  
      Args:
        loc: Floating point tensor; the means of the distribution(s).
        scale: Floating point tensor; the scale of the
          distribution(s). Must contain only positive values.
        power: Floating point tensor; the shape parameter of the distribution(s).
          Must contain only positive values. `loc`, `scale` and `power` must have
          compatible shapes for broadcasting.
        validate_args: Python `bool`, default `False`. When `True` distribution
          parameters are checked for validity despite possibly degrading runtime
          performance. When `False` invalid inputs may silently render incorrect
          outputs.
        allow_nan_stats: Python `bool`, default `True`. When `True`,
          statistics (e.g., mean, mode, variance) use the value "`NaN`" to
          indicate the result is undefined. When `False`, an exception is raised
          if one or more of the statistic's batch members are undefined.
        name: Python `str` name prefixed to Ops created by this class.
  
      Raises:
        TypeError: if `loc`, `scale`, and `power` have different `dtype`.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          dtype = dtype_util.common_dtype(
              [loc, scale, power], dtype_hint=tf.float32
          )
          self._loc = tensor_util.convert_nonref_to_tensor(
              loc, dtype=dtype, name="loc"
          )
          self._scale = tensor_util.convert_nonref_to_tensor(
              scale, dtype=dtype, name="scale"
          )
          self._power = tensor_util.convert_nonref_to_tensor(
              power, dtype=dtype, name="power"
          )
          super(GeneralizedNormal, self).__init__(
              dtype=dtype,
              reparameterization_type=reparameterization.FULLY_REPARAMETERIZED,
              validate_args=validate_args,
              allow_nan_stats=allow_nan_stats,
              parameters=parameters,
              name=name,
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python import random
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 1 to create a new GeneralizedNormal object from inherited base classes: distribution with example: obj = GeneralizedNormal(loc, scale, power, validate_args, allow_nan_stats, name)