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

ERROR #1

Closed
FlyToYourMooN opened this issue Feb 27, 2022 · 13 comments
Closed

ERROR #1

FlyToYourMooN opened this issue Feb 27, 2022 · 13 comments

Comments

@FlyToYourMooN
Copy link

File "train.py", line 320, in 3.24s/it]
main(args, configs)
File "train.py", line 196, in main
figs, wav_reconstruction, wav_prediction, tag = synth_one_sample(
File "/data/workspace/liukaiyang/TTS/DiffGAN-TTS-main/utils/tools.py", line 227, in synth_one_sample
mels = [mel_pred[0, :mel_len].float().detach().transpose(0, 1) for mel_pred in diffusion.sampling()]
File "/root/anaconda3/envs/LKYBase/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "/data/workspace/liukaiyang/TTS/DiffGAN-TTS-main/model/diffusion.py", line 157, in sampling
b, *_, device = *self.cond.shape, self.cond.device
File "/root/anaconda3/envs/LKYBase/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1177, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'GaussianDiffusion' object has no attribute 'cond'

Thank for your work!I seem to get a Error……

@FlyToYourMooN
Copy link
Author

This problem only arises in the val phase, since the sampleling() requires the cond parameter, but self.cond is not defined in the val phase, is this a bug?

@keonlee9420
Copy link
Owner

Hi @biqigubafan , sorry but I cannot reproduce this error. In my running, there was no issue on val sampling. Could you please make sure that you used the latest version of the code? There have been some updates in the repo without leaving the commit logs (I initialized all things as it's just born).

@FlyToYourMooN
Copy link
Author

捕获1

捕获

@FlyToYourMooN
Copy link
Author

FlyToYourMooN commented Mar 1, 2022

Hello! I downloaded your code on Sunday. I found that in the val stage of “shallow”, called diffusion.sampling(), but sampling() needs to use “cond”. Since self.cond is defined in forward, at this time diffusion.sampling () does not run forward, so “cond” will show undefined, which is my guess, and I don't understand it very well, but I added the cond parameter to sampling() and changed the relevant parts, it can run normally.
Maybe I have encountered some very special bugs... Anyway, thank you very much for your work! This code is very helpful to me, I want to improve the Baseline and help me graduate!

@keonlee9420
Copy link
Owner

I see. Did you follow the steps in README? You're supposed to train 'shallow' model after training 'aux' model, so that the 'shallow' model can leverage the pre-trained 'aux' model during its training.

@FlyToYourMooN
Copy link
Author

I follow the steps try again,thanks!

@The-Water
Copy link

我按照步骤再试一次,谢谢!
Hi, I have the same problem as you, I want to know how you modified the code, thank you very much!

@yyh565655555
Copy link

Hello! I downloaded your code on Sunday. I found that in the val stage of “shallow”, called diffusion.sampling(), but sampling() needs to use “cond”. Since self.cond is defined in forward, at this time diffusion.sampling () does not run forward, so “cond” will show undefined, which is my guess, and I don't understand it very well, but I added the cond parameter to sampling() and changed the relevant parts, it can run normally. Maybe I have encountered some very special bugs... Anyway, thank you very much for your work! This code is very helpful to me, I want to improve the Baseline and help me graduate!

hi , i also met the problem when i train naive, may you tell me how to modify the code? 3q

@wangxuanji
Copy link

Have you solved it? Can you share the code you modified? This is really important to me. As a novice, it's really difficult for me

@wangxuanji
Copy link

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

@FlyToYourMooN
Copy link
Author

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

时间太过久远我忘记了,不过确实成功运行了,好像是一层层把这个参数改了还是去掉,我再看看

@wangxuanji
Copy link

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

时间太过久远我忘记了,不过确实成功运行了,好像是一层层把这个参数改了还是去掉,我再看看

非常感谢您!我刚开始接触这些,很多东西没有人问和交流,这对我来说实在困难

@FlyToYourMooN
Copy link
Author

FlyToYourMooN commented Mar 7, 2024 via email

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

5 participants