You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run CellCharter on a single sample, and I get the following error during the model train process: model.train(early_stopping=True, enable_progress_bar=True)
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 128])
Hi @marcovarrone, I agree, I found it quite strange too, and I did infact first make sure there was no issue with my anndata object. I have ~100k+ cells and ~5k genes in my object. Here is my output of print(adata_xenium):
Since the error is happening during the training of scvi you can try writing an issue in their GitHub repository.
By looking at the scVI issues, I have seen that this error tends to appear when the number of cells is such that the last batch has size 1. You can see here.
It doesn't llook to be your case because 172943%128 is 15, so the last batch would have 15 elements. Still, you could try to change the batch size.
Report
I am trying to run CellCharter on a single sample, and I get the following error during the model train process:
model.train(early_stopping=True, enable_progress_bar=True)
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 128])
Prior to this, I setup the model as follows:
model = scvi.model.SCVI(adata_xenium)
Here is the session info:
Version information
0.3.2
The text was updated successfully, but these errors were encountered: