Copy name of inputs/outputs in multi_gpu_model.
@@ -171,7 +171,7 @@ def multi_gpu_model(model, gpus):
# Merge outputs on CPU.
with tf.device('/cpu:0'):
merged = []
- for outputs in all_outputs:
+ for name, outputs in zip(model.output_names, all_outputs):
merged.append(concatenate(outputs,
- axis=0))
+ axis=0, name=name))
return Model(model.inputs, merged)
