Sometimes it is annoying to run TensorFlow, and some warnings such as warnings or version updates are often reported, as follows:
So how to remove or not display these things, you can do it by simply adding a few lines of code, let's take a look.
This way there will be no warning.
Summarize:
1 import os 2 os.environ[ " TF_CPP_MIN_LOG_LEVEL " ]= ' 1 ' 3 #Default display level, display all information 4 os.environ[ " TF_CPP_MIN_LOG_LEVEL " ]= ' 2 ' 5 # Only display warning and Error 6 os.environ [ " TF_CPP_MIN_LOG_LEVEL " ]= ' 3 ' 7 # only display Error