# tf_agents.distributions.reparameterized_sampling.sample

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/distributions/reparameterized_sampling.py#L26-L51) |

Sample from distribution either with reparameterized sampling or regular sampling.

    tf_agents.distributions.reparameterized_sampling.sample(
        distribution, reparam=False, **kwargs
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `distribution` | A [`tfp.distributions.Distribution`](https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/Distribution) instance. |
| `reparam` | Whether to use reparameterized sampling. |
| `**kwargs` | Parameters to be passed to distribution's sample() fucntion. |

<br />

Returns: