shahrukhqasim / TIES-2.0

Code for: S.R. Qasim, H. Mahmood, and F. Shafait, Rethinking Table Recognition using Graph Neural Networks (2019)
MIT License
276 stars 69 forks source link

OP_REQUIRES failed #47

Open iazdan opened 3 years ago

iazdan commented 3 years ago

2021-03-19 05:40:04.139370: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at example_parsing_ops.cc:240 : Invalid argument: Key: global_features. Can't parse serialized Example. Traceback (most recent call last): File "/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call return fn(*args) File " anaconda3/envs/tr-graph/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "anaconda3/envs/tr-graph/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Key: global_features. Can't parse serialized Example. [[{{node ParseSingleExample/ParseSingleExample}}]] [[IteratorGetNext_1]] [[IteratorGetNext_1/_3]] (1) Invalid argument: Key: global_features. Can't parse serialized Example. [[{{node ParseSingleExample/ParseSingleExample}}]] [[IteratorGetNext_1]] 0 successful operations. 0 derived errors ignored.

During handling of the above exception, another exception occurred:

ivaylojelev commented 2 years ago

I encountered the exact same problem - I am using tfrecords generated from a different dataset by using methods from the DataGeneration repo.

Do you have any updates on this issue?

ivaylojelev commented 2 years ago

Just in case that this is still relevant, your issue should be solved if you set num_global_features=4 in config.ini. The error comes from the fact that the dimensionality of the global_features in the TF-records is different than what the TF-record reader expects. Hence, it can't parse the example.