When running a Python program on Linux that includes import tensorflow
(installed without GPU support), a bunch of OpenMP debug messages are written to stdout,
As the other answer told me what to do but not exactly how to do it, I decided to add my answer.
If you want to suppress these warnings, you can do so by setting the KMP_WARNINGS environment variable to a false value. In code, you can do this as follows; in your script you need to first import os and then set the environ variable, like so:
import os
os.environ["KMP_WARNINGS"] = "FALSE"
Any false value works here as long its a string format, "0"
, "off"
and "no"
will also work.