Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 128]) #200

Open
zclecle2 opened this issue Sep 19, 2024 · 1 comment

Comments

@zclecle2
Copy link

Hi,
Really thank you for providing scvi tool in seurat environment.
I recently happened to a problem:

Weixin Image_20240920003733

I checked online, and found that there seems to be a solution:
https://github.com/scverse/scvi-tools/issues/2314
"Hi, this unfortunately occurs when the last batch of the training set contains one observation, leading to the batch norm layer complaining. You can solve this by passing in a batch_size to the train method that is different than the default one."

However, in seurat-wrapppers function
(```
#' obj <- IntegrateLayers(object = obj, method = scVIIntegration,
#' orig.reduction = "pca", new.reduction = 'integrated.scvi',
#' assay = "SCT", conda_env = '../miniconda3/envs/scvi-env', verbose = FALSE).

```), I can't modify the parameters provided to the train method.
Could you please help with this problem? Many thanks!

@hannatadros93
Copy link

second this question^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants