scvi.external.gimvi.JVAE.sample_from_posterior_z

JVAE.sample_from_posterior_z(x, mode=None, deterministic=False)[source]

Sample tensor of latent values from the posterior.

Parameters
x : TensorTensor

tensor of values with shape (batch_size, n_input)

mode : int | NoneOptional[int] (default: None)

head id to use in the encoder

deterministic : boolbool (default: False)

bool - whether to sample or not

Return type

TensorTensor

Returns

type tensor of shape (batch_size, n_latent)