Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is an error with Keras.__version__ in the Tensorflow Notebook #64

Open
edwinsibarra opened this issue Mar 13, 2024 · 0 comments
Open

Comments

@edwinsibarra
Copy link

As of the console output, Keras has no attribute called "version".

Keras has been integrated into Tensorflow and when imported from tensorflow they have the same version.

At least according to StackOverflow:

https://stackoverflow.com/questions/73934025/attributeerror-module-keras-has-no-attribute-version

The resolutions of this issue would consist of deleting one line of code in https://github.com/MicrosoftDocs/ml-basics/blob/master/05a%20-%20Deep%20Neural%20Networks%20(TensorFlow).ipynb right after importing TF.

import tensorflow
from tensorflow import keras
from tensorflow.keras import models
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras import utils
from tensorflow.keras import optimizers

# Set random seed for reproducability
tensorflow.random.set_seed(0)

print("Libraries imported.")
print('Keras version:',keras.__version__) #This line has to go
print('TensorFlow version:',tensorflow.__version__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant