Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keras AssertionError: Duplicate registrations for type 'experimentalOptimizer'

I'm trying to build a Deep Q Learning code for CartPole-v1 game. However I encounter an AssertionError:

AssertionError: Duplicate registrations for type 'experimentalOptimizer'

Some of the stacktrace is shown below:

the error

I upgraded TensorFlow but it didn't work. What should I do to fix it?

System Details

  • Windows OS
  • Spyder IDE
  • Anaconda 3 (base environment)
like image 645
mustafa can nacak Avatar asked Sep 02 '26 19:09

mustafa can nacak


1 Answers

Same problem : I completely uninstalled the libraries (nightly...), and reinstalled the latest stable version (pip3 install tensorflow) I'm on linux, don't have your configuration, don't know which libraries are installed. Anyway I hope this helps.

So : uninstall keras, tensorboard, tensorflow, tensorflow-gpu if it's installed, idem for tb-nightly, keras-nightly, tf-nightly

Re-install without specifications tensorflow, it will take care of needed lib.

like image 138
Mih Zam Avatar answered Sep 04 '26 09:09

Mih Zam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!