xmengli / H-DenseUNet

TMI 2018. H-DenseUNet: Hybrid Densely Connected UNet for Liver and Tumor Segmentation from CT Volumes
526 stars 161 forks source link

Some questions about train 2D DenseUnet #41

Open ghost opened 5 years ago

ghost commented 5 years ago

When I run sh bash_train.sh , there were some questions as the following:

Traceback (most recent call last):
      File "train_ 2ddense.py". line 215, in <modulestrain_ and_ predictl
      File "train_ 2ddense.py". line 180, in train_ and_ predict
      model = make_ parallel (model, args.b 1 l0, mini_ batch=l)
      File "Keras-2.0. 8/keras/utils2/multi gpu.py". line 68, in make_ parallel
      merged . append(concatenate(outputs axis=0))
      File "Keras-2.0. 8/keras/layers/merge.py line 600 in concatenate
      return Concatenate(axis=axis, **kwa rgs ) (inputs )
      File "Keras-2.0. 8/keras/engine/topologypy line 602, in_ call__
      output = self . call(inputs, **kwargs )
      File "Keras-2. 0.8/keras/layers/merge.py line 332, in call
      return K.concatenate(inputs axis=self .axis)
      File "Keras-2.0. 8/keras/backend/tensorflow_ backend.py". line 1707. in concatenate 
      return tf . sparse_ concat(axis, tensors )
      File " /usr/local/lib/python2.7/dist -packages/ tenso rflow/python/ops/sparse_ ops.py". line 237. in sparse_ concat
gen_ sparse_ ops._ sparse_ concat(inds, vals, shapes, axis, name=name) )
      File "/usr/local/lib/python2 .7/dist- packages/ tenso rflow/ python/ops/gen_ sparse_ ops.py". line 663, in_ sparse_ concat
      concat_ dim=concat_ dim. namename)
      File "/usr/local/lib/python2 .7/dist -packages/ tensorf Low/ python/ framework/op_ def_ library.py". line 570, in ,apply_ op_ helper
      (input_ name, op_ type_ name, len(values), num_ attr.minimum )
ValueError: List argument ' indices' to 'SparseConcat' 0p with length 0 shorter than minimum length 2.

So why did these happen? How to solve them?

mnc1423 commented 5 years ago

modify your batch size

Jingwen-Lee commented 3 years ago

When I run sh bash_train.sh , there were some questions as the following:

Traceback (most recent call last):
      File "train_ 2ddense.py". line 215, in <modulestrain_ and_ predictl
      File "train_ 2ddense.py". line 180, in train_ and_ predict
      model = make_ parallel (model, args.b 1 l0, mini_ batch=l)
      File "Keras-2.0. 8/keras/utils2/multi gpu.py". line 68, in make_ parallel
      merged . append(concatenate(outputs axis=0))
      File "Keras-2.0. 8/keras/layers/merge.py line 600 in concatenate
      return Concatenate(axis=axis, **kwa rgs ) (inputs )
      File "Keras-2.0. 8/keras/engine/topologypy line 602, in_ call__
      output = self . call(inputs, **kwargs )
      File "Keras-2. 0.8/keras/layers/merge.py line 332, in call
      return K.concatenate(inputs axis=self .axis)
      File "Keras-2.0. 8/keras/backend/tensorflow_ backend.py". line 1707. in concatenate 
      return tf . sparse_ concat(axis, tensors )
      File " /usr/local/lib/python2.7/dist -packages/ tenso rflow/python/ops/sparse_ ops.py". line 237. in sparse_ concat
gen_ sparse_ ops._ sparse_ concat(inds, vals, shapes, axis, name=name) )
      File "/usr/local/lib/python2 .7/dist- packages/ tenso rflow/ python/ops/gen_ sparse_ ops.py". line 663, in_ sparse_ concat
      concat_ dim=concat_ dim. namename)
      File "/usr/local/lib/python2 .7/dist -packages/ tensorf Low/ python/ framework/op_ def_ library.py". line 570, in ,apply_ op_ helper
      (input_ name, op_ type_ name, len(values), num_ attr.minimum )
ValueError: List argument ' indices' to 'SparseConcat' 0p with length 0 shorter than minimum length 2.

So why did these happen? How to solve them?

I have the same question. I wonder how you solved it. thx!

WeiDuan123 commented 2 years ago

Have you solved the problem? I met the same question.