I am new to Ml (Cat & Dog Detection). I have trouble in using Keras library in a Jupyter Notebook.
I tried to install Tensorflow within jupyter note book by this:
import tensorflow as tf
I don't know if this is right way to call Keras but in second cell i tried:
from keras.models import Sequential
Error:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-10-9c5e0a19b646> in <module>
----> 1 from keras.models import Sequential
ModuleNotFoundError: No module named 'keras'
Absolutely Keras is not a module in Tensorflow library 😂, If cant get it with Tensorflow how should I call it?
You have to do !pip install keras within your jupyter notebook to install the keras package before you can import keras. Keras uses tensorflow backend, so when you install keras it installs tensorflow as part of the requirements.
When you install tensorflow 2.x, keras is installed along with it. Thus you can import keras from tensorflow:
from tensorflow.keras import Sequential
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With