Skip to content

AttributeError: module 'tensorflow' has no attribute 'get_default_graph'  #3

@ChasingWind

Description

@ChasingWind

I had this issue:
AttributeError: module 'tensorflow' has no attribute 'get_default_graph'
Then I asked for help online.I knowed tensorflow and keras may be not compatible .
So I replaced :
import keras
with :
from tensorflow import keras
replaced:
from keras.someing import someting
with:
from tensorflow .keras.someing import someting .
Then the issue changed:
from tensorflow.keras.layers import Dense, Dropout, Merge, Input
ImportError: cannot import name 'Merge
So what should I do to deal with is?What version of tf and keras do you use ? I use Keras 2.1.0 and tensorflow 2.1.0. How to deal with that tensorflow and keras arenot compatible ?
Looking forward to your reply.Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions