Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target length zero error #45

Open
limhj23 opened this issue Feb 18, 2020 · 0 comments
Open

Target length zero error #45

limhj23 opened this issue Feb 18, 2020 · 0 comments

Comments

@limhj23
Copy link

limhj23 commented Feb 18, 2020

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]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant