Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to install keras 2.0 seprately after installing tensorflow 1.3?

I just upgraded my tf from 1.0 to tf 1.3 (pip install --upgrade tensorflow) . I know keras 2.0 became part of tensorflow since tf version 1.2. However, when I import keras and check its version it still shows 1.2. Am I supposed to upgrade keras also? if so, then what does "the Keras API will now become available directly as part of TensorFlow, starting with TensorFlow 1.2" mean?

like image 932
Kai Avatar asked Aug 17 '17 17:08

Kai


1 Answers

Nope, you don't need to install keras 2.0 separately. (See: https://www.tensorflow.org/guide/keras)

Do this:

import tensorflow as tf

model = tf.keras.Sequential()

Don't do this (Unless you really need framework independent code):

import keras

model = keras.Sequential()
like image 137
Byest Avatar answered Oct 20 '22 03:10

Byest