If you want to hide or disable TensorFlow debugging information below,

 

import os

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # or any {'0', '1', '2'}

import tensorflow as tf

 

TF_CPP_MIN_LOG_LEVEL; it defaults to 0 (all logs shown), but can be set to 1 to filter out INFO logs, 2 to additionally filter out WARNING logs, and 3 to additionally filter out ERROR logs.

 

ws@ws:~/Workspace$ python tf.py   

2019-07-12 07:44:16.585819: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1 
2019-07-12 07:44:16.860276: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:  
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:1d:00.0
2019-07-12 07:44:16.861489: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 1 with properties:  
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:1e:00.0
2019-07-12 07:44:16.862628: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 2 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:1f:00.0
2019-07-12 07:44:16.864141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 3 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:20:00.0
2019-07-12 07:44:16.865387: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 4 with properties:  
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:21:00.0
2019-07-12 07:44:16.866669: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 5 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:22:00.0
2019-07-12 07:44:16.867914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 6 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:23:00.0
2019-07-12 07:44:16.869227: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 7 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:24:00.0
2019-07-12 07:44:16.869433: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-12 07:44:16.870603: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2019-07-12 07:44:16.871672: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2019-07-12 07:44:16.871910: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2019-07-12 07:44:16.873264: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0 
2019-07-12 07:44:16.874328: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2019-07-12 07:44:16.877818: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-12 07:44:16.897425: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0, 1, 2, 3, 4, 5, 6, 7
2019-07-12 07:44:16.897846: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA
2019-07-12 07:44:16.950833: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2100000000 Hz 
2019-07-12 07:44:16.956784: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5606065f95a0 executing computations on platform Host. Devices: 
2019-07-12 07:44:16.956835: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): , 
2019-07-12 07:44:18.288266: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:  
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:1d:00.0
2019-07-12 07:44:18.289852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 1 with properties:  
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:1e:00.0
2019-07-12 07:44:18.290952: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 2 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:1f:00.0
2019-07-12 07:44:18.292144: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 3 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:20:00.0
2019-07-12 07:44:18.293335: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 4 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:21:00.0
2019-07-12 07:44:18.294552: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 5 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:22:00.0
2019-07-12 07:44:18.295764: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 6 with properties:  
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:23:00.0
2019-07-12 07:44:18.296948: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 7 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
pciBusID: 0000:24:00.0
2019-07-12 07:44:18.296987: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-12 07:44:18.296996: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2019-07-12 07:44:18.297003: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2019-07-12 07:44:18.297012: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2019-07-12 07:44:18.297021: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2019-07-12 07:44:18.297030: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2019-07-12 07:44:18.297039: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-12 07:44:18.315215: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0, 1, 2, 3, 4, 5, 6, 7 
2019-07-12 07:44:18.315255: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-12 07:44:18.327431: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 1:   N N N N N N N N
2019-07-12 07:44:18.327437: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 2:   N N N N N N N N
2019-07-12 07:44:18.327443: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 3:   N N N N N N N N
2019-07-12 07:44:18.327448: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 4:   N N N N N N N N
2019-07-12 07:44:18.327453: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 5:   N N N N N N N N
2019-07-12 07:44:18.327459: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 6:   N N N N N N N N
2019-07-12 07:44:18.327464: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 7:   N N N N N N N N
2019-07-12 07:44:18.339213: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7224 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:1d:00.0, compute capability: 7.5)
2019-07-12 07:44:18.342159: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 6221 MB memory) -> physical GPU (device: 1, name: GeForce RTX 2080 Ti, pci bus id: 0000:1e:00.0, compute capability: 7.5)2019-07-12 07:44:18.345088: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:2 with 4494 MB memory) -> physical GPU (device: 2, name: GeForce RTX 2080 Ti, pci bus id: 0000:1f:00.0, compute capability: 7.5)2019-07-12 07:44:18.348209: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:3 with 10312 MB memory) -> physical GPU (device: 3, name: GeForce RTX 2080 Ti, pci bus id: 0000:20:00.0, compute capability: 7.5)2019-07-12 07:44:18.351502: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:4 with 10312 MB memory) -> physical GPU (device: 4, name: GeForce RTX 2080 Ti, pci bus id: 0000:21:00.0, compute capability: 7.5)2019-07-12 07:44:18.354488: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:5 with 10312 MB memory) -> physical GPU (device: 5, name: GeForce RTX 2080 Ti, pci bus id: 0000:22:00.0, compute capability: 7.5)2019-07-12 07:44:18.357475: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:6 with 10312 MB memory) -> physical GPU (device: 6, name: GeForce RTX 2080 Ti, pci bus id: 0000:23:00.0, compute capability: 7.5)2019-07-12 07:44:18.360540: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:7 with 10312 MB memory) -> physical GPU (device: 7, name: GeForce RTX 2080 Ti, pci bus id: 0000:24:00.0, compute capability: 7.5)2019-07-12 07:44:18.363684: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56060d448fa0 executing computations on platform CUDA. Devices:
2019-07-12 07:44:18.363701: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): GeForce RTX 2080 Ti, Compute Capability 7.52019-07-12 07:44:18.363708: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (1): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 07:44:18.363714: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (2): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 07:44:18.363719: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (3): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 07:44:18.363742: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (4): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 07:44:18.363748: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (5): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 07:44:18.363754: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (6): GeForce RTX 2080 Ti, Compute Capability 7.5
2019-07-12 07:44:18.363760: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (7): GeForce RTX 2080 Ti, Compute Capability 7.5

 

# Reference: https://stackoverflow.com/questions/35911252/disable-tensorflow-debugging-information

 

Disable Tensorflow debugging information

By debugging information I mean what TensorFlow shows in my terminal about loaded libraries and found devices etc. not Python errors. I tensorflow/stream_executor/dso_loader.cc:105] successfully o...

stackoverflow.com

'LANGUAGE > PyTorch' 카테고리의 다른 글

BiLSTM  (0) 2019.08.01
PyTorch Examples  (0) 2019.08.01
Random Seed Initialization for Reproducibility ...  (0) 2019.07.15
Difference between model.eval() and torch.no_grad()  (0) 2019.07.15
How to use TensorBoard for PyTorch?  (0) 2019.07.12

+ Recent posts