Lakwin Chandula
Lakwin Chandula

Reputation: 159

AttributeError: module 'tensorflow' has no attribute 'python' in Keras Tensorflow

System Info :

I am working on a siamese algorithm on keras tensorflow backend. I have imported keras backend as follow and it shows above attribute error. What could be the reason for that and how to avoid this issue?

import tensorflow.python.keras.backend as K

AttributeError: module 'tensorflow' has no attribute 'python'

Upvotes: 0

Views: 2022

Answers (1)

Pieter-Jan
Pieter-Jan

Reputation: 540

It means that within the module 'tensorflow', no attribute named 'python' exists. You don't really need to import python as a module I believe. Try this:

import tensorflow.keras.backend as K

Upvotes: 3

Related Questions