pythonlessons / mltu

Machine Learning Training Utilities (for TensorFlow and PyTorch)
MIT License
160 stars 100 forks source link

Unable to execute Train.py file in Captcha to text project #46

Closed shaikalfaaz closed 3 months ago

shaikalfaaz commented 3 months ago

Getting this error

n model.fit( File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler raise e.with_traceback(filtered_tb) from None File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/mltu/tensorflow/metrics.py", line 58, in update_state self.batch_counter.assign_add(len(y_true)) ^^^^^^^^^^^ TypeError: len is not well defined for a symbolic Tensor (data_1:0). Please call x.shape rather than len(x) for shape information.

is this code compatible with current versions of tensorflow and mltu? @pythonlessons I hope you reply on this Thank you

pythonlessons commented 3 months ago

which TensorFlow version you use?

shaikalfaaz commented 3 months ago

@pythonlessons Im using tensorflow 2.16.1

pythonlessons commented 3 months ago

install older tensorflow version, for example 2.14, I'll test 2.16.1 when I can

shaikalfaaz commented 3 months ago

Working fine with 2.14.0 tensorflow verison thank you sir!

pythonlessons commented 3 months ago

No problem, with 2.16 TensorFlow version a lot of stuff changes