# Keras v3 question

**URL:** <https://discuss.ai.google.dev/t/keras-v3-question/36044>\
**Category:** Keras\
**Tags:** tfkeras\
**Created:** [August 12, 2024, 7:55pm UTC](https://discuss.ai.google.dev/t/keras-v3-question/36044 "2024-08-12T19:55:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdlin1](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/kdlin1/32/9101_2.png) [@kdlin1](https://discuss.ai.google.dev/u/kdlin1)\
**Post date:** [August 12, 2024, 7:55pm UTC](https://discuss.ai.google.dev/t/keras-v3-question/36044/1 "2024-08-12T19:55:55Z")

</div>

If I use TF version greater than or equal to V2.16, does it mean I will automatically use Keras v3? Will there be any compatibility issues?

What is the best practice for going forward? Do I use “import keras” or continue to use tf.keras?

---

<div class="post-metadata">

**Author:** ![Aniket\_Dubey](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/aniket_dubey/32/16664_2.png) [@Aniket\_Dubey](https://discuss.ai.google.dev/u/Aniket_Dubey)\
**Post date:** [August 27, 2024, 7:11am UTC](https://discuss.ai.google.dev/t/keras-v3-question/36044/3 "2024-08-27T07:11:51Z")

</div>

Hi @kdlin1

> [@kdlin1](#):
>
> If I use TF version greater than or equal to V2.16, does it mean I will automatically use Keras v3? Will there be any compatibility issues

Yes, Starting with `TensorFlow 2.16` using `pip install tensorflow` will automatically install `Keras 3`. So, when you have `TF >= 2.16` and `Keras 3`, then by default `from tensorflow import keras` ([`tf.keras`](https://www.tensorflow.org/api_docs/python/tf/keras)) will be Keras 3 as mentioned in this [document](https://keras.io/getting_started/#tensorflow--keras-2-backwards-compatibility).

> [@kdlin1](#):
>
> What is the best practice for going forward? Do I use “import keras” or continue to use tf.keras?

You can consider using Keras 3 directly with `import keras` if you want backend flexibility and the latest Keras features.  
Please refer the above attached document for more detailed understanding in this.

Hope this helps! Thank You.
