Skip to content

Commit

Permalink
Suppress deprecation warnings on tensorflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chaklim committed Nov 10, 2019
1 parent 0729b4e commit 03faea8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion clair/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=FutureWarning)
warnings.filterwarnings('ignore', category=DeprecationWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
import tensorflow as tf
from tensorflow.python.client import device_lib
from tensorflow.python.ops import array_ops
Expand Down
5 changes: 4 additions & 1 deletion clair/selu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
'''
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=FutureWarning)
warnings.filterwarnings('ignore', category=DeprecationWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
import tensorflow as tf
from tensorflow.contrib import layers
from tensorflow.python.framework import ops
Expand Down

0 comments on commit 03faea8

Please sign in to comment.