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

多卡训练问题 #21

Open
Sun-Wenfeng opened this issue Feb 22, 2022 · 2 comments
Open

多卡训练问题 #21

Sun-Wenfeng opened this issue Feb 22, 2022 · 2 comments

Comments

@Sun-Wenfeng
Copy link

在option.py中有选项“--n_GPUs",这是指定用多少块GPU参与训练吗?那么我应该怎样指定参与训练的GPU编号,比如我想要用4,5,6,7这四块GPU训练模型,应该在命令行中怎么写?
期待您的回复!

@LongguangWang
Copy link
Member

Hi @Sun-Wenfeng. 可以在main.py的主函数外部(比如第8行)加上这句代码:os.environ['CUDA_VISIBLE_DEVICES'] = "4,5,6,7",然后n_GPUs设置为4就可以了。

@Sun-Wenfeng
Copy link
Author

嗨@孙文峰。可以在main.py的主函数(比如第8行)加上这句代码:os.environ['CUDA_VISIBLE_DEVICES'] = "4,5,6,7",然后n_GPUs设置为4就可以了。

谢谢您的回复,我已经解决了这个问题。
我还有另一个问题:我该如何使用训练好的模型,来对我现有的真实图片(real image)进行重建?

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