tf_agents.specs.distribution_spec.DistributionSpec

Describes a tfp.distribution.Distribution.

builder Callable function(params) which returns a Distribution following the spec.
input_params_spec Nest of tensor_specs describing the tensor parameters required for building the described distribution.
sample_spec Data type of the output samples of the described distribution.
**distribution_parameters<a id="distribution_parameters"> Extra parameters for building the distribution.

builder Returns the distribution_builder of the spec.
distribution_parameters Returns the distribution_parameters of the spec.
input_params_spec Returns the input_params_spec of the spec.
sample_spec Returns the sample_spec of the spec.

Methods

build_distribution

View source

Creates an instance of the described distribution.

The spec's paramers are updated with the given ones. Args: **distribution_parameters: Kwargs update the spec's distribution parameters.

Returns
Distribution instance.