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 XGBoost, Python, and Tensorflow together for software development?
- How can I use Tensorflow 1.x with Python 3.8?
- How can I use Python and TensorFlow to create an XOR gate?
- How can I access the 'inputs' attribute in the 'tensorflow_estimator.python.estimator.api._v2.estimator' module?
- How do I install Tensorflow with a Python wheel (whl) file?
- How can I check the compatibility of different versions of Python and TensorFlow?
- How can I use Python and TensorFlow to handle illegal hardware instructions in Zsh?
- How can I convert a Tensor object to a list in Python using TensorFlow?
- ¿Cómo implementar reconocimiento facial con TensorFlow y Python?
See more codes...