Tensor dimensions mismatch error when using sparse matrix to train expiMap
Closed this issue · 2 comments
maarten-devries commented
Hi,
I have installed the latest scArches directly from GitHub (i.e. using pip+git
), since I want to use expiMap on an AnnData where adata.X is a sparse matrix.
For reproducibility sake I am running this tutorial: https://scarches.readthedocs.io/en/latest/expimap_surgery_pipeline_basic.html
The only thing I changed before prior to running intr_cvae.train()
, is that I made the adata.X
a sparse matrix:
import scipy.sparse
adata.X = scipy.sparse.csr_matrix(adata.X)
Expected output:
Model trains successfully when intr_cvae.train()
is called
Observed output:
RuntimeError: Tensors must have same number of dimensions: got 3 and 2
Koncopd commented
Thx, i will check what causes the problem.
Koncopd commented
This is fixed on master now.