简体   繁体   English

Keras Multi_GPU_Model:像糖蜜一样缓慢

[英]Keras Multi_GPU_Model: Slow like Molasses

I am investigating Keras for multi gpu modeling.我正在研究用于多 GPU 建模的 Keras。 So before I invest time on it, I tried out a simple skipgram model on a 4 gpu instance from lambdalabs.因此,在我投入时间之前,我在 lambdalabs 的 4 gpu 实例上尝试了一个简单的 skipgram 模型。

The one gpu performance, is slightly worse than on Kaggle's kernel (the number of cores are smaller on lambda labs gpus).一个 GPU 的性能,比 Kaggle 的内核稍差(在 lambda labs gpu 上的内核数量更少)。

But the multi gpu performance supremely sucks.但是多 GPU 性能非常糟糕。 I've read https://github.com/keras-team/keras/issues/9204 but its unclear if there is a lot of weight merging for a simple model like this.我已经阅读了https://github.com/keras-team/keras/issues/9204,但不清楚对于像这样的简单模型是否有很多权重合并。

Playing around with batch sizes oscillates between out of memory and converging roughly by the time we have world peace.调整批量大小在内存不足和世界和平时大致收敛之间摇摆不定。 And the question is : Do we know more about multi gpu issues with keras since last year, and how might I go about trouble shooting it?问题是:自去年以来,我们是否对 keras 的多 GPU 问题了解得更多,我该如何解决它?

Also - I am using fit_generator.另外 - 我正在使用 fit_generator。 Are the arguments "use_multiprocessing" and "workers" for the gpu or for the cpu?(I think the latter). gpu 或 cpu 的参数是“use_multiprocessing”和“workers”吗?(我认为是后者)。

use_multiprocessing=Trueworkers>0 ,keras 将使用 multiprocess 在 cpu 中生成数据并将它们提供给 gpu。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM