keras AssertionError: Duplicate registrations for type ‘experimentalOptimizer’

We Are Going To Discuss About keras AssertionError: Duplicate registrations for type ‘experimentalOptimizer’. So lets Start this Python Article.

keras AssertionError: Duplicate registrations for type ‘experimentalOptimizer’

  1. How to solve keras AssertionError: Duplicate registrations for type 'experimentalOptimizer'

    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.

  2. keras AssertionError: Duplicate registrations for type 'experimentalOptimizer'

    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.

Solution 1

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.

Original Author Mih Zam Of This Content

Solution 2

Sorry this does not help. I tried

pip3 uninstall tensorflow absl-py astunparse flatbuffers gast google-pasta grpcio h5py keras keras-preprocessing libclang numpy opt-einsum protobuf setuptools six tensorboard tensorflow-io-gcs-filesystem termcolor tf-estimator-nightly typing-extensions wrapt

then

pip3 install --no-cache-dir tensorflow

But the error is still there. I guess after uninstall I need to remove some files manually…

Update: got it. Had to remove .local/lib/python3.9/site-packages/keras as sudo. Then reinstall helped.

Original Author Jan Of This Content

Solution 3

  1. uninstall:
    • keras
    • keras-nightly
    • keras-preprocessing
    • tensorboard
    • tensorflow
    • tb-nightly
    • tf-nightly
  2. pip3 install tensorflow
    

Original Author Uday Sandeep Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment