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.

When Training: [error] Invalid argument: Saw a non-null label(index >= num_classes -1 ) following a null label, batch: 8 num_classes: 562 labels

See original GitHub issue

My environment is as follows:

Ubuntu 17.04
python 3.6.3
tensorflow 1.7.0

When I am training on dataset of ICDAR15 Task4.3 whose tfrecords are generated by write_text_features.py, I encoutered this problem:

2018-06-05 03:08:22.133657: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at ctc_loss_op.cc:166 : Invalid argument: Saw a non-null label (index >= num_classes - 1) following a null label, batch: 26 num_classes: 562 labels: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1327, in _do_call
    return fn(*args)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1312, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1420, in _call_tf_sessionrun
    status, run_metadata)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/errors_impl.py", line 516, in __exit__
    c_api.TF_GetCode(self.status.status))

This problem probably is caused by ctc loss in tf, but I don’t know how to solve it.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mdbenitocommented, Sep 18, 2018

@flamywhale you should definitely check your labels for commas. If you want to have them in your character set, you can add maxplit=1 to your call to spit() as in line.strip().split(',', maxsplit=1)

0reactions
blusekingcommented, Sep 21, 2018

@FannyDuan you can find the answer to this issue in the following link: https://github.com/MaybeShewill-CV/CRNN_Tensorflow/issues/69#issuecomment-383992527

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid argument: Saw a non-null label (index >= num_classes
Im getting the following error while doing CTC training ...
Read more >
Lprnet training error (non-null label, index >= num_classes - 1)
Hi,. I am testing lprnet newly added in tlt-v3.0. After following the data preparation steps, I started the training but it is failing....
Read more >
Cleaning Up Incorrectly Labelled Data (C3W2L02) - YouTube
Take the Deep Learning Specialization: http://bit.ly/32SsRMNCheck out all our courses: https://www.deeplearning.aiSubscribe to The Batch, ...
Read more >
10-701 Midterm Exam Solutions, Spring 2007
The following short questions should be answered with at most two ... [1 point] true/false Given m data points, the training error converges...
Read more >
MapServer Documentation
See also: Cartographical Symbol Construction with MapServer, Symbology Examples, and SYMBOL. LABEL. • defined within a CLASS object.
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