[gen_golden] suppress warnings (#9097)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Fri, 22 Nov 2019 02:55:29 +0000 (11:55 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 22 Nov 2019 02:55:29 +0000 (11:55 +0900)
It suppresses two kinds of warnings:

- Future warnings
- TensorFlow Information

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
tools/nnpackage_tool/gen_golden/gen_golden.py

index ab57b2b..6e758f7 100755 (executable)
@@ -1,7 +1,11 @@
 #!/usr/bin/env python3
 
-import tensorflow as tf
+import warnings
+with warnings.catch_warnings():
+    warnings.filterwarnings("ignore", category=FutureWarning)
+    import tensorflow as tf
 import os
+os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
 import sys
 import argparse