python-tensorflowHow can I check the version of TensorFlow and Keras I am using with Python?
To check the version of TensorFlow and Keras you are using with Python, you can use the following code block:
import tensorflow as tf
import keras
print(tf.__version__)
print(keras.__version__)
The output of the code will be the version of TensorFlow and Keras you are using:
2.1.0
2.3.1
The code block consists of the following parts:
import tensorflow as tf
- imports the TensorFlow library and assigns it to the variabletf
.import keras
- imports the Keras library.print(tf.__version__)
- prints out the version of TensorFlow you are using.print(keras.__version__)
- prints out the version of Keras you are using.
Helpful links
More of Python Tensorflow
- ¿Cómo implementar reconocimiento facial con TensorFlow y Python?
- How do I use the Xception model in TensorFlow with Python?
- How can I check the compatibility of different versions of Python and TensorFlow?
- How can I use TensorFlow Lite with XNNPACK in Python?
- How can I use TensorFlow Python Data Ops BatchDataset?
- How can I use Python and TensorFlow to handle illegal hardware instructions in Zsh?
- How can I use Python and TensorFlow to create an XOR gate?
- How can I use Python TensorFlow in W3Schools?
- How can I generate a summary of my TensorFlow model in Python?
- How can I use Tensorflow 1.x with Python 3.8?
See more codes...