Reputation: 1927
Inspired by this post.
Why is there a difference between the 2 modules?
When would I use one over the other?
Anything else I should know?
Upvotes: 3
Views: 796
Reputation: 4960
Keras is a standalone high-level API that supports TensorFlow, Theano and CNTK backends. Now, Theano and CNTK are out of development.
tf.keras
is the Keras API integrated into TensorFlow 2.
So, if you aim to use TensorFlow as your deep learning framework I recommend using tensorflow.keras
for less headache.
Also based on a tweet from François Chollet, the creator of Keras:
We recommend you switch your Keras code to
tf.keras
.Both Theano and CNTK are out of development. Meanwhile, as Keras backends, they represent less than 4% of Keras usage. The other 96% of users (of which more than half are already on
tf.keras
) are better served withtf.keras
.Keras development will focus on
tf.keras
going forward.Importantly, we will seek to start developing
tf.keras
in its own standalone GitHub repository at keras-team/keras in order to make it much easier for 3rd party folks to contribute.
Upvotes: 4