tensorflow_probability/python/layers/distribution_layer.py
def new(params, event_size, dtype=None, validate_args=False, name=None):
    """Create the distribution instance from a `params` vector."""
    with tf.compat.v1.name_scope(name, 'OneHotCategorical',
                                 [params, event_size]):
      return tfd.OneHotCategorical(
          logits=params,
          dtype=dtype or params.dtype.base_dtype,
          validate_args=validate_args)
def new(params, event_size, dtype=None, validate_args=False, name=None):
    """Create the distribution instance from a `params` vector."""
    with tf.compat.v1.name_scope(name, 'OneHotCategorical',
                                 [params, event_size]):
      return tfd.OneHotCategorical(
          logits=params,
          dtype=dtype or params.dtype.base_dtype,
          validate_args=validate_args)
def new ( params , event_size , dtype = None , validate_args = False , name = None ) : with tf . compat . v1 . name_scope ( name , 'OneHotCategorical' , [ params , event_size ] ) : return tfd . OneHotCategorical ( logits = params , dtype = dtype or params . dtype . base_dtype , validate_args = validate_args )
Create the distribution instance from a `params` vector.
Create the distribution instance from a params vector .