[Python] AttributeError: keras.backend has no attribute 'eager'

Discussão em 'Python' iniciado por Stack, Março 8, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using python 3.8.2 , keras 2.3.1 and tensorflow 2.2.0rc4 . just with the following code :

    import keras
    from keras.models import sequential


    I have this error :

    AttributeError: partially initialized module 'keras.backend' has no attribute
    'eager' (most likely due to a circular import)


    if I use :

    import tensorflow


    or

    from tensorflow.keras import ....


    new error:

    AttributeError: partially initialized module 'tensorflow.python.framework.ops' has
    no attribute 'register_tensor_conversion_function' (most likely due to a circular
    import)


    full traceback:

    enter image description here

    enter image description here

    Continue reading...

Compartilhe esta Página