I trained my custom model and used tensorflow 2.1. When I run the code I'm getting the following error:
InvalidArgumentError: assertion failed: [0] [Op:Assert] name: EagerVariableNameReuse
Here is the line which showing the error:
self.train_accuracy = tf.keras.metrics.CategoricalAccuracy('train_accuracy')
What does this error mean, thanks in advance.
Providing the solution here even though it is present in Github, for the benefit of the Stackoverflow Community.
Whenever we are trying to run two python programs that use Tensorflow at the same time triggers this error. Please close other python session using Tensorflow will resolve this issue.
For more information please refer here.
I had the same problem, with the following configuration:
I solved it by downgrading from TensorFlow 2.3.0 to TensorFlow 2.2.0 (as also mentioned here on Github).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With