githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.99k stars 893 forks source link

Not able to get predictions for few images, I am getting the following error. ValueError: Cannot feed value of shape (0,) for Tensor 'Placeholder_1:0', which has shape '(None, 2)' #106

Closed shivakumar-np closed 3 years ago

shivakumar-np commented 3 years ago

File "D:\python_scripts\ImageToText.py",line 60, in infer recognized, probability = model.infer_batch(batch, True)

File "D:\python_scripts\model.py", line 293, in infer_batch loss_vals = self.sess.run(eval_list, feed_dict)

File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\client\session.py", line 968, in run run_metadata_ptr)

File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\client\session.py", line 1167, in _run (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape()))

ValueError: Cannot feed value of shape (0,) for Tensor 'Placeholder_1:0', which has shape '(None, 2)'

githubharald commented 3 years ago

closing for now because you do not provide any information on how to re-produce, and you changed the code.

if you want help: