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
- How do I resolve a SymbolAlreadyExposedError when the symbol "zeros" is already exposed as () in TensorFlow Python util tf_export?
- How can I use Python TensorFlow in W3Schools?
- How can I use Python and TensorFlow to implement YOLOv4?
- How do I use TensorFlow in Python?
- How can I install and use TensorFlow on a Windows machine using Python?
- How can I use Python and TensorFlow to handle illegal hardware instructions in Zsh?
- How do I use the Softmax function in Python Tensorflow?
- How do I resolve the "ImportError: cannot import name 'batchnormalization' from 'tensorflow.python.keras.layers'" error in software development?
- How can I use YOLOv3 with Python and TensorFlow?
- How can I use TensorFlow 2.x to optimize my Python code?
See more codes...