Skip to content

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

@zclecle2

Description

@zclecle2

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions