Last active
February 7, 2020 13:50
-
-
Save mcotton/b9b9bdacbab613c654a6bc9b87018424 to your computer and use it in GitHub Desktop.
fix for Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Look at https://www.tensorflow.org/guide/gpu for an explaination | |
# Here are the two options they presented | |
# | |
# Option 1 | |
# set_memory_growth before creatingt the CONV network | |
import tensorflow as tf | |
gpus = tf.config.experimental.list_physical_devices('GPU') | |
for gpu in gpus: | |
tf.config.experimental.set_memory_growth(gpu, True) | |
# Option 2 | |
# set env variable in shell or .bashrc | |
export TF_FORCE_GPU_ALLOW_GROWTH="true" | |
export TF_CPP_MIN_LOG_LEVEL=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment