question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@de-vri-es Thank you so much for your quick response!

Incomplete error popped up when I ran train_csv.py on my custom data. Train_frcnn.py from yhenon has no problem with my data.


(1) I tried to run train_csv.py on my custom data with Keras 2.0.9. It would stop at different step of the program if I restarted again. It could stop at Epoch 1/20 156/873[…]. But it never finish a epoch.

This is the error:

=============
Epoch 1/20
 31/873 [>.............................] - ETA: 10:59 - loss: 1.1267 - regression_loss: 0.0020 - classification_loss: 1.1246Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/data_utils.py", line 579, in data_generator_task
    generator_output = next(self._generator)
  File "build/bdist.linux-x86_64/egg/keras_retinanet/preprocessing/generator.py", line 217, in next
    return self.compute_input_output(group)
  File "build/bdist.linux-x86_64/egg/keras_retinanet/preprocessing/generator.py", line 195, in compute_input_output
    image_group, annotations_group = self.preprocess_group(image_group, annotations_group)
  File "build/bdist.linux-x86_64/egg/keras_retinanet/preprocessing/generator.py", line 115, in preprocess_group
    image, annotations = random_transform(image, annotations, self.image_data_generator)
  File "build/bdist.linux-x86_64/egg/keras_retinanet/utils/image.py", line 76, in random_transform
    boxes[index, 0] = float(min(j))
 32/873 [>.............................] - ETA: 10:45 - loss: 1.1265 - regression_loss: 0.0020 - classification_loss: 1.1245Traceback (most recent call last):
  File "train_csv.py", line 117, in <module>
    keras.callbacks.ReduceLROnPlateau(monitor='loss', factor=0.1, patience=2, verbose=1, mode='auto', epsilon=0.0001, cooldown=0, min_lr=0),
  File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 2046, in fit_generator
    generator_output = next(output_generator)
StopIteration

(2) @de-vri-es kindly repied my reported error

from @de-vri-es "@Weixing-Zhang: The error message you posted is incomplete. The actual exception is missing. That is probably because of the way keras handles exception in data generators (would be improved by fchollet/keras#8485) . I do not think this is the same issue though.

If this is a reproducible error, could you update Keras to latest master (so that you get fchollet/keras#8485) and open a new issue with the updated error message?"

Then I upgraded Keras to latest master from 2.0.9 as @de-vri-es suggested. Another error showed up: (p.s. the reason I downgraded keras before because ValueError: Error when checking target: expected regression to have shape (None, None, 4) but got array with shape (1, 102438, 5), it seems this error is fixed now).

=============
None
Epoch 1/20
391/873 [============>.................] - ETA: 3:48 - loss: 0.5860 - regression_loss: 0.0018 - classification_loss: 0.5841Traceback (most recent call last):
  File "train_csv.py", line 117, in <module>
    keras.callbacks.ReduceLROnPlateau(monitor='loss', factor=0.1, patience=2, verbose=1, mode='auto', epsilon=0.0001, cooldown=0, min_lr=0),
  File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 2115, in fit_generator
    generator_output = next(output_generator)
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/data_utils.py", line 735, in get
    six.reraise(value.__class__, value, value.__traceback__)
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/data_utils.py", line 635, in data_generator_task
    generator_output = next(self._generator)
  File "build/bdist.linux-x86_64/egg/keras_retinanet/preprocessing/generator.py", line 217, in next
  File "build/bdist.linux-x86_64/egg/keras_retinanet/preprocessing/generator.py", line 195, in compute_input_output
  File "build/bdist.linux-x86_64/egg/keras_retinanet/preprocessing/generator.py", line 115, in preprocess_group
  File "build/bdist.linux-x86_64/egg/keras_retinanet/utils/image.py", line 76, in random_transform
ValueError: min() arg is an empty sequence

Any help would be appreciated!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Weixing-Zhangcommented, Dec 4, 2017

@hgaiser You are right. Your code runs perfectly after I filter out those wrong annotations. I am really sorry for wasting your time. Please allow me have all of your in the acknowledgement section of my research article.

0reactions
hgaisercommented, Dec 4, 2017

Good to hear it’s working, and thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting "Error: This statement is incomplete." - MATLAB Answers
Hello. This is my code and I keep getting the error "This statement is incomplete." several times throughout but can't find the mistake....
Read more >
"The supplied message is incomplete" error when you use an ...
Fixes a problem in which you receive a "Supplied message is incomplete" error message when you use an FTPS client that implements TLS...
Read more >
Installation Incomplete error on Trend Micro Security for ...
Installation Incomplete - A problem prevented the installer from completely setting up Trend Micro Security. "Installation Incomplete". Error ...
Read more >
Syntax Errors and Incomplete Equations - Vensim
Syntax errors can be detected by looking at a single equation; these local errors are typically easy to fix. The Text Editor and...
Read more >
Incomplete error message in exception · Issue #5598 - GitHub
If an exception occurs when executing a command, I executed it again in debug mode ( -vvv option). OS version and name: MacOS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found