def _assert_tensorflow_version():
# Fail with a clear error in case we are not using a compatible TF version.
major, minor, _ = tf.__version__.split('.')
if int(major) != 1 or int(minor) < 4:
raise RuntimeError(
'Tensorflow version >= 1.4, < 2 is required. Found (%s). Please '
'install the latest 1.x version from '
'https://github.com/tensorflow/tensorflow. ' % tf.__version__)
评论列表
文章目录