xmengli/H-DenseUNet

some questions of training train_hybrid.py with using multi_gpu_model

Williamwsk opened this issue · 0 comments

when I train train_hybrid.py with using muti_gpu_model, there is some error: Traceback (most recent call last): File "train_hybrid0.py", line 226, in <module> train_and_predict(args) File "train_hybrid0.py", line 152, in train_and_predict model = multi_gpu_model(model, 3) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/utils/multi_gpu_utils.py", line 226, in multi_gpu_model outputs = model(inputs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/engine/base_layer.py", line 460, in __call__ output = self.call(inputs, **kwargs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/engine/network.py", line 573, in call output_tensors, _, _ = self.run_internal_graph(inputs, masks) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/engine/network.py", line 746, in run_internal_graph layer.call(computed_tensors, **kwargs)) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/layers/merge.py", line 155, in call return self._merge_function(inputs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/layers/merge.py", line 357, in _merge_function return K.concatenate(inputs, axis=self.axis) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 1923, in concatenate return tf.concat([to_dense(x) for x in tensors], axis) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1114, in concat return gen_array_ops.concat_v2(values=values, axis=axis, name=name) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1030, in concat_v2 "ConcatV2", values=values, axis=axis, name=name) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func return func(*args, **kwargs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op op_def=op_def) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1731, in __init__ control_input_ops) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1579, in _create_c_op raise ValueError(str(e)) ValueError: Dimension 0 in both shapes must be equal, but are 0 and 1. Shapes are [0,224,224,8] and [1,224,224,0]. for 'replica_0/auto3d_residual_conv/concatenate_24/concat' (op: 'ConcatV2') with input shapes: [0,224,224,8,1], [1,224,224,0,3], [] and with computed input tensors: input[2] = <4>.
could you tell me how to modify it ?