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

wav2lip_train training error:Expected more than 1 value per channel when training, got input size torch.Size([1, 512, 1, 1]) #563

Open
cncbec opened this issue Oct 12, 2023 · 8 comments

Comments

@cncbec
Copy link

cncbec commented Oct 12, 2023

image
Using my personal data set, the batch size in hparams.py is 16

@ulucsahin
Copy link

Have you been able to resolve this issue? I am also using a custom dataset and getting the same error.

@cncbec
Copy link
Author

cncbec commented Oct 13, 2023

Have you been able to resolve this issue? I am also using a custom dataset and getting the same error.

No,I haven't

@nicoleng
Copy link

I just resolved this issue by adding syncnet.eval() after
`syncnet = SyncNet().to(device)

@cncbec @ulucsahin I am also using a custom dataset and my guess is either this error was not encountered with the original dataset or the model was being set to validate in the eval functions included for LRS2 data which I'm not using

@Ezrealz
Copy link

Ezrealz commented Dec 22, 2023

I experienced the same problem, and whenever sync loss is reduced to 0.75 or less, an error is reported

@bjfrbjx
Copy link

bjfrbjx commented May 13, 2024

!!! 因为pytorch在训练时会使用BatchNormal,就要保证batch_size>1,所以在model.train()下会触发_verify_batch_size()判断。
最后解决只需要准备两个以上的样例

@Jayzeen13
Copy link

Jayzeen13 commented Aug 2, 2024

@nicoleng

I just resolved this issue by adding syncnet.eval() after `syncnet = SyncNet().to(device)

@cncbec @ulucsahin I am also using a custom dataset and my guess is either this error was not encountered with the original dataset or the model was being set to validate in the eval functions included for LRS2 data which I'm not using

Hi, Sorry for bothering you, but since you are using a custom dataset, can you please show me the structure of the filelist for the custom dataset. because when i try to train on my own dataset, the progress is 0% always and i think it is an issue with the filelist(Ex: train.txt file)

@Rykertang
Copy link

@nicoleng

I just resolved this issue by adding syncnet.eval() after syncnet = SyncNet().to(device)我刚刚通过在 syncnet = SyncNet().to(device) 之后添加syncnet.eval() 解决了这个问题
@cncbec @ulucsahin I am also using a custom dataset and my guess is either this error was not encountered with the original dataset or the model was being set to validate in the eval functions included for LRS2 data which I'm not using我也在使用自定义数据集,我的猜测是原始数据集没有遇到此错误,或者模型被设置为在我没有使用的 LRS2 数据包含的 eval 函数中进行验证

Hi, Sorry for bothering you, but since you are using a custom dataset, can you please show me the structure of the filelist for the custom dataset. because when i try to train on my own dataset, the progress is 0% always and i think it is an issue with the filelist(Ex: train.txt file)您好,很抱歉打扰您,但由于您使用的是自定义数据集,您能否向我展示自定义数据集的文件列表的结构。因为当我尝试在自己的数据集上训练时,进度始终为 0%,我认为这是文件列表的问题(例如:train.txt 文件)

Hello, may I ask if this issue has been resolved? I have also encountered this problem

@Rykertang
Copy link

!!! 因为pytorch在训练时会使用BatchNormal,就要保证batch_size>1,所以在model.train()下会触发_verify_batch_size()判断。 最后解决只需要准备两个以上的样例

这个是什么意思,我现在batchsize已经设置为16了还是报错这个

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

8 participants
@Ezrealz @nicoleng @ulucsahin @bjfrbjx @cncbec @Rykertang @Jayzeen13 and others