mvoelk / ssd_detectors

SSD-based object and text detection with Keras, SSD, DSOD, TextBoxes, SegLink, TextBoxes++, CRNN
MIT License
302 stars 85 forks source link

Target length zero error #45

Open limhj23 opened 4 years ago

limhj23 commented 4 years ago

Hi, I was trying to use your CRNN code and found an error written below. I have to admit that I am new to RNN but I think my all inputs were labeled correctly with your code.

I am stuck with this issue for a while. this blocks me producing my first crnn model :(

Traceback (most recent call last): File "crnn_train.py", line 97, in initial_epoch=0) File "D:\experimental\random_test\testvenv\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper return func(*args, *kwargs) File "D:\experimental\random_test\testvenv\lib\site-packages\keras\engine\training.py", line 1658, in fit_generator initial_epoch=initial_epoch) File "D:\experimental\random_test\testvenv\lib\site-packages\keras\engine\training_generator.py", line 215, in fit_generator class_weight=class_weight) File "D:\experimental\random_test\testvenv\lib\site-packages\keras\engine\training.py", line 1449, in train_on_batch outputs = self.train_function(ins) File "D:\experimental\random_test\testvenv\lib\site-packages\keras\backend\tensorflow_backend.py", line 2979, in call return self._call(inputs) File "D:\experimental\random_test\testvenv\lib\site-packages\keras\backend\tensorflow_backend.py", line 2937, in _call fetched = self._callable_fn(array_vals) File "D:\experimental\random_test\testvenv\lib\site-packages\tensorflow\python\client\session.py", line 1458, in call run_metadata_ptr) tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Labels length is zero in batch 2 [[{{node ctc/CTCLoss}}]] (1) Invalid argument: Labels length is zero in batch 2 [[{{node ctc/CTCLoss}}]] [[training/SGD/gradients/ctc/CTCLoss_grad/mul/_315]]