Kind of a nebulous issue title. What we want to do here is enable the following kinds of model experimentation:
normal scvi-tools
have "batch" be a random variable of some particular dimension that is sampled from its normal posterior
use this in computing "batch-biases" to be injected in layers
optionally promote "batch" to a latent variable and add a KL divergence from a standard normal
choose the dimension of this z_batch
optionally add a batch-dependent linear bias to the final output reconstruction (after the nonlinearity): "beta"
Implementation:
there is always a "z_batch" specified by a posterior mean and std
sometimes this "z_batch" can be sampled from its posterior, sometimes it can be fixed at its mean (which would be normal scvi-tools)
a KL divergence can be optionally applied if "z_batch" is sampled from its posterior
"z_batch" gets projected to "z_batch_bias" vectors (for layers where we are conditioning) by means of layer-specific decoder NNs (flexible architecture but same for all layers)
A "normal" run of scvi-tools would correspond to a "z_batch" that does not get sampled (just use the posterior mean) coupled with nonlinear decoders of decent complexity, and no KL divergence on "z_batch".
Kind of a nebulous issue title. What we want to do here is enable the following kinds of model experimentation:
Implementation:
A "normal" run of scvi-tools would correspond to a "z_batch" that does not get sampled (just use the posterior mean) coupled with nonlinear decoders of decent complexity, and no KL divergence on "z_batch".
Related to #145