Python tensorflow.__git_version__() Examples
The following are 4
code examples of tensorflow.__git_version__().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
tensorflow
, or try the search function
.
Example #1
Source File: make_nearest_neighbour_index.py From hub with Apache License 2.0 | 6 votes |
def _ensure_tf2(): """Ensure running with TensorFlow 2 behavior. This function is safe to call even before flags have been parsed. Raises: ImportError: If tensorflow is too old for proper TF2 behavior. """ print("Running with tensorflow %s (git version %s)", tf.__version__, tf.__git_version__) if tf.__version__.startswith("1."): if tf.__git_version__ == "unknown": # For internal testing use. try: tf.compat.v1.enable_v2_behavior() return except AttributeError: pass # Fail below for missing enabler function. raise ImportError("Sorry, this program needs TensorFlow 2.")
Example #2
Source File: task.py From cloudml-samples with Apache License 2.0 | 5 votes |
def main(_): logging.info('Current tf version: %s', tf.__version__) logging.info('Current tf git version: %s', tf.__git_version__) run_training()
Example #3
Source File: versions_test.py From deep_image_model with Apache License 2.0 | 5 votes |
def testGitAndCompilerVersion(self): self.assertEqual(type(tf.__git_version__), str) self.assertEqual(type(tf.__compiler_version__), str) self.assertEqual(type(tf.GIT_VERSION), str) self.assertEqual(type(tf.COMPILER_VERSION), str)
Example #4
Source File: diagnose_tensorboard.py From tensorboard with Apache License 2.0 | 5 votes |
def tensorflow_python_version(): import tensorflow as tf logging.info("tensorflow.__version__: %r", tf.__version__) logging.info("tensorflow.__git_version__: %r", tf.__git_version__)