Skip to content

Instantly share code, notes, and snippets.

@p3jitnath
Last active May 4, 2020 21:44
Show Gist options
  • Save p3jitnath/af2bf611b6124eada28dcc47890c8709 to your computer and use it in GitHub Desktop.
Save p3jitnath/af2bf611b6124eada28dcc47890c8709 to your computer and use it in GitHub Desktop.
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
import tensorflow.compat.v1 as tf # Tensorflow 2.0 support for 1.x
os.environ['TF_CPP_MIN_LOG_LEVEL'] = 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment