H-DenseUNet icon indicating copy to clipboard operation
H-DenseUNet copied to clipboard

train_2ddense.py Error during Custom Data Training

Open larry-11 opened this issue 4 years ago • 2 comments

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/shanyx/anaconda3/envs/larry_keras/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/home/shanyx/anaconda3/envs/larry_keras/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "Keras-2.0.8/keras/utils/data_utils.py", line 568, in data_generator_task
    generator_output = next(self._generator)
  File "train_2ddense.py", line 121, in generate_arrays_from_file
    result_list = pool.map(load_seq_crop_data_masktumor_try, Parameter_List)
  File "/home/shanyx/anaconda3/envs/larry_keras/lib/python2.7/multiprocessing/pool.py", line 253, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/home/shanyx/anaconda3/envs/larry_keras/lib/python2.7/multiprocessing/pool.py", line 572, in get
    raise self._value
ValueError: zero-size array to reduction operation minimum which has no identity

Traceback (most recent call last):
  File "train_2ddense.py", line 224, in <module>
    train_and_predict()
  File "train_2ddense.py", line 219, in train_and_predict
    workers=1, use_multiprocessing=False)
  File "Keras-2.0.8/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "Keras-2.0.8/keras/engine/training.py", line 2011, in fit_generator
    generator_output = next(output_generator)
StopIteration

First, thanks for your work. This occurred when I training on my own dataset. Could you please give me some help? thx!

larry-11 avatar Apr 11 '20 10:04 larry-11

The problem is in the data loader part, I guess. Check if the slicing operation excels the array boundary.

xmengli avatar Apr 15 '20 04:04 xmengli

Has this problem been solved?

19980715dyy avatar Aug 26 '22 11:08 19980715dyy