Skip to content

Instantly share code, notes, and snippets.

@Napear
Last active April 12, 2020 06:30
Show Gist options
  • Save Napear/e581f0fe29cd6d18715f9e9ccc554140 to your computer and use it in GitHub Desktop.
Save Napear/e581f0fe29cd6d18715f9e9ccc554140 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.per_process_gpu_memory_fraction = 0.6
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment