Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import os
import numpy as np
import cv2
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
tf.get_logger().setLevel('ERROR')
gpus = tf.config.experimental.list_physical_devices('GPU')
for gpu in gpus:
print(gpu)
tf.config.experimental.set_memory_growth(gpu, True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment