Skip to content

Commit

Permalink
add cleverhans.utils_tf.silence
Browse files Browse the repository at this point in the history
  • Loading branch information
goodfeli committed Oct 12, 2018
1 parent 95219b8 commit 035118a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cleverhans/utils_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,3 +520,10 @@ def get_available_gpus():
"""
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']


def silence():
"""
Silences tensorflaw's default printed messages
"""
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

0 comments on commit 035118a

Please sign in to comment.