Keras shows no Improvements to training speed with GPU (partial GPU usage?!)

前端 未结 3 1870
独厮守ぢ
独厮守ぢ 2021-02-07 20:49

I am trying to train my model on a GPU instead of a CPU on an AWS p2.xlarge instance from my Jupyter Notebook. I am using tensorflow-gpu backend (only tensorflow-gpu

3条回答
  •  清歌不尽
    2021-02-07 21:13

    Try to use some bigger value for batch_size in model.fit, because the default is 32. Increase it until you get 100% CPU utilization.

    Following suggestion from @dgumo, you can also put your data into /run/shm. This is an in-memory file system, which allows to access data in fastest possible way. Alternatively, you can ensure that your data resides at least on SSD. For example in /tmp.

提交回复
热议问题