Skip to content

Instantly share code, notes, and snippets.

@kittinan
Created July 11, 2020 17:26
Show Gist options
  • Save kittinan/1624799fda8da311f35c7509ddf448bb to your computer and use it in GitHub Desktop.
Save kittinan/1624799fda8da311f35c7509ddf448bb to your computer and use it in GitHub Desktop.
Fix Failed to get convolution algorithm.

Fix Tensorflow 2.X Keras Error

If you install correct Tensorflow, cuDNN and CUDA Toolkit version and got this error message.

Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.

Try to Add this code below before import your tensorflow

import tensorflow.compat.v1 as tf
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment