Hi, I’m using the AnnData format, but I get a warning when I try to train the model on min-max normalized single-cell inputs:
/module/_vae.py:458: UserWarning: The value argument must be within the support of the distribution
reconst_loss = -generative_outputs[“px”].log_prob(x).sum(-1)
Can the training data (X) be positive floating-point numbers, or do they have to be positive integers? This data doesn’t contain any NANs or negative values.
This question is in reference to this post:
I don’t receive the same warning if positive integers are used to train the model.
Hi, scVI expects raw count data as input (as do the vast majority of models in scvi-tools), so inputting any form of normalized data will result in undefined behavior. This is because we parametrize discrete distributions in the generative model.
You’ll notice that you get a warning, not an error - the model will still attempt to train, but it’s likely you’ll end up with NaNs during training and/or a poorly-fit model.
Please consult our user guides and tutorials for more details!