mypackage.MyModule.sample¶
-
MyModule.
sample
(tensors, n_samples=1, library_size=1)[source]¶ Generate observation samples from the posterior predictive distribution.
The posterior predictive distribution is written as \(p(\hat{x} \mid x)\).
- Parameters
- tensors
Tensors dict
- n_samples
Number of required samples for each cell
- library_size
Library size to scale scamples to
- Return type
- Returns
x_new :
torch.Tensor
tensor with shape (n_cells, n_genes, n_samples)