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 when using more than 2 GPUs #24

Open
madorin0130 opened this issue Sep 12, 2021 · 1 comment
Open

Error when using more than 2 GPUs #24

madorin0130 opened this issue Sep 12, 2021 · 1 comment

Comments

@madorin0130
Copy link

Hi, when I execute the sample code like that, I have the following error.
Does anyone have similar error and how did you solve it?

CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python train.py --batch 32 --ckpt ./checkpoints/source_ffhq.pt --data_path ./processed_data/<dataset>/ --exp <exp_name>

Traceback (most recent call last): File "train.py", line 602, in <module> train(args, loader, generator, discriminator, extra, g_optim, File "train.py", line 303, in train source_sample, feat_source = g_source([z], return_feats=True) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 161, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 171, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply output.reraise() File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/_utils.py", line 428, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in replica 4 on device 4. Original Traceback (most recent call last): File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker output = module(*input, **kwargs) File "/opt/conda/envs/myenv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) TypeError: forward() missing 1 required positional argument: 'styles'

@fikry102
Copy link

Is there any solution for this problem?

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