Closed WeitaoVan closed 5 years ago
Yes, it is. Even multi gpus are available, only the first gpu is used for building the model in Tensorflow. To make use of the left gpus, you should use 'tf.device("/gpu:0")' to set the gpu used for each operations. What's more, the "colocate_gradients_with_ops" should be True when call the tf.compute_gradients. This makes the gradients of each ops are allocated on the same gpu with the operation. For more information, you can search "tf.device" and "colocate_gradients_with_ops" by search engine.
Thanks very much for your code.
The script accepts arguments like 0,1,2,3 to specify multiple gpus. However, only 1 gpu is actually used for computation.
Could you explain how to train with multiple gpus?
Thanks!