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

paddleclas模型训练gpu如何高效利用 #3197

Open
chinesejunzai12 opened this issue Jul 25, 2024 · 3 comments
Open

paddleclas模型训练gpu如何高效利用 #3197

chinesejunzai12 opened this issue Jul 25, 2024 · 3 comments

Comments

@chinesejunzai12
Copy link

在配置文件中
sampler:
name: PKSampler
batch_size: 256
# batch_size: 128
sample_per_id: 4
drop_last: False
shuffle: True
sample_method: "id_avg_prob"
id_list: [50030, 80700, 92019, 96015] # be careful when set relabel=True
ratio: [4, 4]
loader:
num_workers: 12 # 增加数据处理的工作进程
use_shared_memory: True
增加了num_workers的数量, 但是GPU的利用率还是很低, 脉冲式工作
image
很大部分时间是休息的, 如何提高GPU的利用率呢

@cuicheng01
Copy link
Collaborator

cuicheng01 commented Aug 1, 2024

如果你的机器可以安装DALI的话,建议使用DALI做图像预处理呢,这样的话预处理就会跑在GPU上。这样的话只需要增加参数-o Global.use_dali=True即可

@chinesejunzai12
Copy link
Author

如果你的机器可以安装DALI的话,建议使用DALI做图像预处理呢,这样的话预处理就会跑在GPU上。这样的话只需要增加参数-o Global.use_dali=True即可

DALI查看了只支持四种图像处理, 像图像增广处理不了

@cuicheng01
Copy link
Collaborator

shitu的处理方式应该是都支持了

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