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

How to processing multi GPU? #12

Open
hyeonjinXZ opened this issue Apr 25, 2022 · 0 comments
Open

How to processing multi GPU? #12

hyeonjinXZ opened this issue Apr 25, 2022 · 0 comments

Comments

@hyeonjinXZ
Copy link

hyeonjinXZ commented Apr 25, 2022

Hello,

I'd like to processing with multi GPU. So I set the gpu_id from 0 to 0,1.
GPU_ID: '0,1' in pororo_s1_vlc.yml .
And I used nn.parallel.data_parallel too. (

# nn.parallel.data_parallel(netG.sample_videos, st_inputs, self.gpus)
)
But I got an error: AttributeError: 'DataParallel' object has no attribute 'sample_videos'.

Traceback (most recent call last):
  File "train_vlcgan.py", line 225, in <module>
    PIL.Image.fromarray,
  File "/project/6057220/xianzhen/storygan/vlcgan/trainer_vlc.py", line 353, in train
    lr_st_fake, st_fake, m_mu, m_logvar, c_mu, c_logvar, s_word = netG.sample_videos(*st_inputs)
  File "/home/xianzhen/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1177, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DataParallel' object has no attribute 'sample_videos'
  1. how to I solve it?
  2. Is there any reason you didn't use DistributedDataParallel?
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