Created
September 15, 2018 17:49
-
-
Save shaybensasson/f99bc5cc8b6aa8f4680c4734f2dea09b to your computer and use it in GitHub Desktop.
Python assert tf version using LooseVersion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from distutils.version import LooseVersion | |
| import tensorflow as tf | |
| # Check TensorFlow Version | |
| assert LooseVersion(tf.__version__) >= LooseVersion('1.3'), 'Please use TensorFlow version 1.3 or newer' | |
| print('TensorFlow Version: {}'.format(tf.__version__)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment