4

I was wondering, what's the difference between importing keras from tensorflow using import tensorflow.keras or just pip installing keras alone and importing it using import keras as both seemed to work nicely so far, the only difference I noticed is that i get Using TensorFlow backend. in the command line every time I execute the one using keras.

Glen E. Renner
  • 117
  • 1
  • 9

1 Answers1

12

Tensorflow.keras is an version of Keras API implemented specifically for use with Tensorflow. It is a part of Tensorflow repo and from TF version 2.0 will become main high level API replacing tf.layers and slim.

The only reason to use standalone keras is to maintain framework-agnostic code, i.e. use it with another backend.

Sharky
  • 4,473
  • 2
  • 19
  • 27