DecoderSCVI¶
-
class
scvi.models.modules.
DecoderSCVI
(n_input, n_output, n_cat_list=None, n_layers=1, n_hidden=128)[source]¶ Bases:
torch.nn.modules.module.Module
Decodes data from latent space of
n_input
dimensionsn_output
dimensions using a fully-connected neural network ofn_hidden
layers.- Parameters
n_input (
int
int
) – The dimensionality of the input (latent space)n_output (
int
int
) – The dimensionality of the output (data space)n_cat_list (
Iterable
[int
],None
Optional
[Iterable
[int
]]) – A list containing the number of categories for each category of interest. Each category will be included using a one-hot encodingn_layers (
int
int
) – The number of fully-connected hidden layersdropout_rate – Dropout rate to apply to each of the hidden layers
- Returns
Methods Summary
forward
(dispersion, z, library, *cat_list)The forward computation for a single sample.
Methods Documentation
-
forward
(dispersion, z, library, *cat_list)[source]¶ The forward computation for a single sample.
Decodes the data from the latent space using the decoder network
Returns parameters for the ZINB distribution of expression
If
dispersion != 'gene-cell'
then value for that param will beNone
- Parameters
One of the following
'gene'
- dispersion parameter of NB is constant per gene across cells'gene-batch'
- dispersion can differ between different batches'gene-label'
- dispersion can differ between different labels'gene-cell'
- dispersion can differ for every gene in every cell
cat_list (
int
int
) – list of category membership(s) for this sample
- Returns
4-tuple of
torch.Tensor
parameters for the ZINB distribution of expression