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
# Taken from https://github.com/keras-team/keras/issues/2436#issuecomment-354882296 | |
# but saved into this gist to make it more easily findable. | |
from keras import Model | |
from keras.utils import multi_gpu_model | |
class ModelMGPU(Model): | |
def __init__(self, ser_model, gpus): | |
pmodel = multi_gpu_model(ser_model, gpus) |