python-tensorflowHow do I print the version of Python Tensorflow I am using?
The version of TensorFlow that you are using can be determined by printing the version number of the TensorFlow package. This can be done by using the tf.version
module.
Example code
import tensorflow as tf
print(tf.version)
Output example
<module 'tensorflow_core._api.v2.version' from '/usr/local/lib/python3.6/dist-packages/tensorflow_core/_api/v2/version/__init__.py'>
The version number of the TensorFlow package can be accessed by using the __version__
attribute of the tf.version
module.
Example code
import tensorflow as tf
print(tf.version.__version__)
Output example
2.2.0
In summary, the version of TensorFlow that you are using can be determined by printing the version number of the TensorFlow package using the tf.version.__version__
attribute.
Helpful links
More of Python Tensorflow
- How can I use Python and TensorFlow to handle illegal hardware instructions in Zsh?
- How can I use TensorFlow Lite with XNNPACK in Python?
- 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 and TensorFlow to create an XOR gate?
- How do I install Python TensorFlow on Windows?
- How can I check the compatibility of different versions of Python and TensorFlow?
- How can I determine the size of a Python Tensorflow package?
- How can I generate a summary of my TensorFlow model in Python?
- How do I resolve the "ImportError: cannot import name 'batchnormalization' from 'tensorflow.python.keras.layers'" error in software development?
- ¿Cómo implementar reconocimiento facial con TensorFlow y Python?
See more codes...