ValueError: Expected parameter loc (Parameter of shape (1, 13866)) of distribution Normal(loc: torch.Size([1, 13866]), scale: torch.Size([1, 13866])) to satisfy the constraint Real(), but found invalid values #397
Labels
question
Further information is requested
Dear cell2location team,
I encountered an error when training Visium HD spatial transcriptome data. We first combined the bins into cells using a 10x nucleus segmentation strategy, and then used this h5ad file as the input file for the cell2location analysis. For the scRNA-seq data, we used the same tissue 5' scRNA-seq data as a reference, the “mod.train” step for the scRNA-seq data worked fine, but for the spatial data, it reported a “ValueError: Expected parameter loc (Parameter of shape (1, 13866)) of distribution Normal(loc: torch.Size([1, 13866]), scale: torch.Size([1, 13866])) to satisfy the constraint Real(), but found invalid values".
I checked the input spatial data and it was raw count data (integer) and not normalized. For the spatial model, I set “N_cells_per_location” to 1 and “detection_alpha” to 200. I don't know if these parameters make sense for the Visium HD nucleus segmentation data or if these values cause the above error. Could you help resolve this issue?
Best,
hua
The text was updated successfully, but these errors were encountered: