fix init bug for multi gpu model

This commit is contained in:
nl 2018-09-26 19:45:53 +08:00
parent f4ca4f30f1
commit 8c51888f71
1 changed files with 1 additions and 0 deletions

View File

@ -24,6 +24,7 @@ class ParallelModel(keras.models.Model):
keras_model: The Keras model to parallelize keras_model: The Keras model to parallelize
gpu_count: Number of GPUs. Must be > 1 gpu_count: Number of GPUs. Must be > 1
""" """
super(ParallelModel, self).__init__() # Thanks to @greatken999 for fixing bugs
self.inner_model = keras_model self.inner_model = keras_model
self.gpu_count = gpu_count self.gpu_count = gpu_count
merged_outputs = self.make_parallel() merged_outputs = self.make_parallel()