JavaScript
x
3
1
2021-01-26 17:13:35.314383: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2
2021-01-26 17:13:35.321533: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
3
The execution of the code tends to pause for a while when this occurs. Is there a solution to this?
Advertisement
Answer
If you’re working with Tensorflow 2.0, setting TF_CPP_MIN_LOG_LEVEL
should still work
You can disable all logs using os.environ:
JavaScript
1
4
1
import os
2
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
3
import tensorflow as tf
4
Here,
JavaScript
1
5
1
0 = all messages are logged (default behavior)
2
1 = INFO messages are not printed
3
2 = INFO and WARNING messages are not printed
4
3 = INFO, WARNING, and ERROR messages are not printed
5
(The above is tested on TensorFlow 0.12 and 1.0)