Hi, Thank you for your great work. I meet the same error with #65 . I am trying to run DestVI on other datasets, and I've transformed all the data into h5ad format with all necessary values to train the model.
I'm following the DestVI_tutorial.ipynb to run the training in order to do cell type deconvolution
My single cell data:
AnnData object with n_obs × n_vars = 32534 × 979
obs: 'Area', 'AspectRatio', 'Width', 'Height', 'Mean.CD298', 'Max.CD298', 'Mean.PanCK', 'Max.PanCK', 'Mean.CD45', 'Max.CD45', 'Mean.CD20', 'Max.CD20', 'Mean.DAPI', 'Max.DAPI', 'dualfiles', 'Run_name', 'Slide_name', 'ISH.concentration', 'Dash', 'tissue', 'slide_ID_numeric', 'Run_Tissue_name', 'Panel', 'Diversity', 'totalcounts', 'log10totalcounts', 'background', 'remove_flagged_cells', 'IFcolor', 'nb_clus', 'leiden_clus', 'negmean', 'class', 'cell_type', 'cell_ID'
My spatial data:
AnnData object with n_obs × n_vars = 340 × 979
obs: 'fov', 'spot_id', 'x', 'y', 'cell_counts', 'Ascending.vasa.recta.endothelium', 'B-cell', 'Connecting.tubule', 'Descending.vasa.recta.endothelium', 'Distinct.proximal.tubule.1', 'Distinct.proximal.tubule.2', 'Epithelial.progenitor.cell', 'Fibroblast', 'Glomerular.endothelium', 'Indistinct.intercalated.cell', 'MNP.a.classical.monocyte.derived', 'MNP.b.non.classical.monocyte.derived', 'MNP.c.dendritic.cell', 'Myofibroblast', 'NK', 'Pelvic.epithelium', 'Peritubular.capillary.endothelium.1', 'Peritubular.capillary.endothelium.2', 'Podocyte', 'Principal.cell', 'Proliferating.Proximal.Tubule', 'Proximal.tubule', 'T CD4 memory', 'T CD4 naive', 'T CD8 memory', 'T CD8 naive', 'Thick.ascending.limb.of.Loop.of.Henle', 'Transitional.urothelium', 'Treg', 'Type.A.intercalated.cell', 'Type.B.intercalated.cell', 'mDC', 'macrophage', 'mast', 'monocyte', 'neutrophil', 'pDC', 'plasmablast'
obsm: 'location'
Single cell data has the same gene list with spatial data
However, when training the model: it works fine in CondSCVI, but I meet the ValueError in DestVI training:
Exception has occurred: ValueError Expected value argument (Parameter of shape (979,)) to be within the support (Real()) of the distribution Normal(loc: torch.Size([979]), scale: torch.Size([979])), but found invalid values: Parameter containing: tensor([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,...
I am try to use raw data input or use log-normalized data input, or change the learning rate, but I still meet the ValueError.
Have you faced with similar error before? Hoping that you can help me, thank you so much!