Created
August 20, 2020 21:40
-
-
Save danyashorokh/420ed19d515eb6b6d0a798c14cebb81e to your computer and use it in GitHub Desktop.
[KERAS] Multi gpu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.utils import multi_gpu_model | |
from keras import backend as K | |
print(K.tensorflow_backend._get_available_gpus()) | |
n_gpus = 2 | |
model = get_some_model() | |
gpu_model = multi_gpu_model(model, gpus=n_gpus) | |
gpu_model.compile() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment