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

issue with training "bird_attnDCGAN2.yml" #77

Closed
weili-git opened this issue Apr 28, 2020 · 1 comment
Closed

issue with training "bird_attnDCGAN2.yml" #77

weili-git opened this issue Apr 28, 2020 · 1 comment

Comments

@weili-git
Copy link

Traceback (most recent call last):
File "/AttnGAN-master3/code/main.py", line 140, in
algo.train()
File "\AttnGAN-master3\code\trainer.py", line 285, in train
sent_emb, real_labels, fake_labels)
File "\AttnGAN-master3\code\miscc\losses.py", line 143, in discriminator_loss
cond_real_logits = netD.COND_DNET(real_features, conditions)
File "\Anaconda3\envs\torch-env\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "\AttnGAN-master3\code\model.py", line 567, in forward
h_c_code = torch.cat((h_code, c_code), 1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 4 and 1 in dimension 2 at c:\a\w\1\s\tmp_conda_3.6_091443\conda\conda-bld\pytorch_1544087948354\work\aten\src\thc\generic/THCTensorMath.cu:83

Process finished with exit code 1

Training using config file "bird_attn2.yml" worked normally, but when I tried to use DCGAN version, it failed with errors above.

@weili-git
Copy link
Author

I fixed it by setting config.py "__C.GAN.B_DCGAN = True"

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

1 participant