torch.distributions.Distribution.rsample
Distribution.rsample(options?: SampleOptions): TensorDistribution.rsample(sample_shape: readonly number[], options?: SampleOptions): TensorGenerate reparameterized samples (gradients flow through).
Only available if has_rsample is true. By default, throws an error.
Parameters
optionsSampleOptionsoptional- Additional options (if first arg was shape)
Returns
Tensor– Differentiable tensor of shape [*sample_shape, *batch_shape, *event_shape]