# scvi.model.SCVI input values

**URL:** <https://discourse.scverse.org/t/scvi-model-scvi-input-values/2233>\
**Category:** scvi-tools\
**Tags:** integration, scvi\
**Created:** [April 23, 2024, 9:35pm UTC](https://discourse.scverse.org/t/scvi-model-scvi-input-values/2233 "2024-04-23T21:35:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![camsc](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@camsc](https://discourse.scverse.org/u/camsc)\
**Post date:** [April 23, 2024, 9:35pm UTC](https://discourse.scverse.org/t/scvi-model-scvi-input-values/2233/1 "2024-04-23T21:35:19Z")

</div>

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:

> <https://github.com/scverse/scvi-tools/issues/2449#issuecomment-1917435957>
>
> Hello,
> 
> I am using the scANVI model for batch correction of pancreas cell data…, as demonstrated in this \[tutorial.\](https://docs.scvi-tools.org/en/0.15.1/tutorials/notebooks/scarches\_scvi\_tools.html) However, during the training of my model, I encountered the following warning: "The value argument must be within the support of the distribution. Reconst\_loss = -px.log\_prob(x).sum(-1)."
> 
> Here is the code snippet I used:
> url = "https://figshare.com/ndownloader/files/24539828"
> raw\_adata = sc.read("raw\_scib\_pancreas.h5ad", backup\_url=url)
> sc.pp.highly\_variable\_genes(raw\_adata, n\_top\_genes=2000,batch\_key="tech")
> scvi.model.SCANVI.setup\_anndata(raw\_adata, batch\_key="tech", labels\_key="celltype",unlabeled\_category="Unknown")
> vae = scvi.model.SCANVI(raw\_adata)
> vae.train()
> adata.obsm\["X\_scVI"\] = vae.get\_latent\_representation()
> 
> My question is : could this warning affect my results afterward ?

I don’t receive the same warning if positive integers are used to train the model.

---

<div class="post-metadata">

**Author:** ![martinkim0](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/martinkim0/32/881_2.png) [@martinkim0](https://discourse.scverse.org/u/martinkim0)\
**Post date:** [April 23, 2024, 11:23pm UTC](https://discourse.scverse.org/t/scvi-model-scvi-input-values/2233/2 "2024-04-23T23:23:37Z")

</div>

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!
