Commit 1e4dee8b authored by Yuxin Wu's avatar Yuxin Wu

silent TF1.x warnings

parent ed6cc793
...@@ -65,6 +65,20 @@ else: ...@@ -65,6 +65,20 @@ else:
except Exception: except Exception:
pass pass
# silence the massive deprecation warnings in TF 1.13+
if (int(_version[0]), int(_version[1])) >= (1, 13):
try:
from tensorflow.python.util.deprecation import silence
except Exception:
pass
else:
silence().__enter__()
try:
from tensorflow.python.util import deprecation_wrapper
deprecation_wrapper._PER_MODULE_WARNING_LIMIT = 0
except Exception:
pass
# Monkey-patch tf.test.is_gpu_available to avoid side effects: # Monkey-patch tf.test.is_gpu_available to avoid side effects:
# https://github.com/tensorflow/tensorflow/issues/26460 # https://github.com/tensorflow/tensorflow/issues/26460
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment