Skip to content

Instantly share code, notes, and snippets.

@melvincabatuan
Created April 21, 2020 06:22
Show Gist options
  • Save melvincabatuan/361bc84cd8faedb33b3c6f54f4b3352a to your computer and use it in GitHub Desktop.
Save melvincabatuan/361bc84cd8faedb33b3c6f54f4b3352a to your computer and use it in GitHub Desktop.
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
tf.config.experimental.set_virtual_device_configuration(gpus[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=1024)])
except RuntimeError as e:
print(e)
or
sudo rm -rf ~/.nv/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment