AttributeError: '_thread._local' object has no attribute 'value'

Hello,

The previously proposed solution did not satisfied me as i did not want to downgrade Keras and TF. After searching online, I found this fix, which worked for me :

Iā€™m using keras 2.3.1, tensorflow 2.0.0, python 3.6, linux Mint 19.2 Cinnamon.
My project is based on Waitress, so I canā€™t use ā€œthreaded=Falseā€.

I found an UGLY workaroundā€¦
In the main ā€œpost managerā€ function I put this codeā€¦

import keras.backend.tensorflow_backend as tb
tb._SYMBOLIC_SCOPE.value = True

And this solved the problem for meā€¦
I hope it will be useful to find a solution

By @ccasadei

I hope this can be a solution for others having the same problem as us.

Best,

2 Likes