Model Traning gives error
See original GitHub issueHi, i tried to train model but it gives this error. i cant train it. i am using python 3.9.2 and tensorflow nightly built. https://pypi.org/project/tf-nightly/
i tried this png for training and created gt.txt
https://d1ly52g9wjvbd2.cloudfront.net/img16/M/O/FF_Modern-Antiqua-RegularA.png
None
Traceback (most recent call last):
File “C:\Program Files\Python39\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Program Files\Python39\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "c:\calamari-ocr\Scripts\calamari-train.exe_main.py", line 7, in <module>
File “c:\calamari-ocr\lib\site-packages\calamari_ocr\scripts\train.py”, line 367, in main
run(args)
File “c:\calamari-ocr\lib\site-packages\calamari_ocr\scripts\train.py”, line 357, in run
trainer.train(
File “c:\calamari-ocr\lib\site-packages\calamari_ocr\ocr\trainer.py”, line 197, in train
self._run_train(train_net, train_start_time, progress_bar, self.dataset, self.validation_dataset, training_callback)
File “c:\calamari-ocr\lib\site-packages\calamari_ocr\ocr\trainer.py”, line 213, in _run_train
train_net.train(train_dataset, val_dataset, checkpoint_params, self.txt_postproc, progress_bar, training_callback)
File “c:\calamari-ocr\lib\site-packages\calamari_ocr\ocr\backends\tensorflow_backend\tensorflow_model.py”, line 317, in train
predict_func = K.function({t.op.name: t for t in [self.input_data, self.input_length, self.input_params, self.targets, self.targets_length]}, [self.cer, self.sparse_targets, self.sparse_decoded])
File “c:\calamari-ocr\lib\site-packages\calamari_ocr\ocr\backends\tensorflow_backend\tensorflow_model.py”, line 317, in <dictcomp>
predict_func = K.function({t.op.name: t for t in [self.input_data, self.input_length, self.input_params, self.targets, self.targets_length]}, [self.cer, self.sparse_targets, self.sparse_decoded])
File “c:\calamari-ocr\lib\site-packages\tensorflow\python\keras\engine\keras_tensor.py”, line 236, in op
raise TypeError('Keras symbolic inputs/outputs do not ’
TypeError: Keras symbolic inputs/outputs do not implement op
. You may be trying to pass Keras symbolic inputs/outputs to a TF API that does not register dispatching, preventing Keras from automatically converting the API call to a lambda layer in the Functional Model.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
ckpt files are the model
@ChWick Never mind, I got it work locally with Python 3.6 and tensorflow 2.2.1 (with calamari-ocr 1.0.5).