TypeError: '<' not supported between instances of 'function' and 'function'

good morning,

i tried to test the following colab project

i correct many errors but i did not find any answer of the following error :


model.compile(loss=‘sparse_categorical_crossentropy’,optimizer=opt,metrics=[‘accuracy’])
File “/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py”, line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File “/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/nest_util.py”, line 727, in _tf_core_flatten
return _pywrap_utils.Flatten(structure, expand_composites)
TypeError: ‘<’ not supported between instances of ‘function’ and ‘function’

this project is already tested using an old versions of tensorflow, keras …as mentioned in env.txt file: GitHub - erwei-xilinx/Enabling-Binary-Neural-Network-Training-on-the-Edge

could you please help me to solve this probem.

thanks an advance

Hi @Aydi_Walid

Welcome to the TensorFlow Forum!

The above error caused because you are using the older code with the latest TensorFlow version. It seems the code and it’s APIs are not supporting as per latest TensorFlow and Keras version. Please check the prerequisites mentioned in env.txt to run the above code. Thank you.