scvi.module.TOTALVAE.loss

TOTALVAE.loss(tensors, inference_outputs, generative_outputs, pro_recons_weight=1.0, kl_weight=1.0)[source]

Returns the reconstruction loss and the Kullback divergences.

Parameters
x

tensor of values with shape (batch_size, n_input_genes)

y

tensor of values with shape (batch_size, n_input_proteins)

local_l_mean_gene

tensor of means of the prior distribution of latent variable l with shape (batch_size, 1)``

local_l_var_gene

tensor of variancess of the prior distribution of latent variable l with shape (batch_size, 1)

batch_index

array that indicates which batch the cells belong to with shape batch_size

label

tensor of cell-types labels with shape (batch_size, n_labels)

Return type

Tuple[FloatTensor, FloatTensor, FloatTensor, FloatTensor]Tuple[FloatTensor, FloatTensor, FloatTensor, FloatTensor]

Returns

type the reconstruction loss and the Kullback divergences