当前位置: 代码迷 >> 综合 >> tensorflow报错:Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
  详细解决方案

tensorflow报错:Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR

热度:90   发布时间:2023-12-08 17:54:50.0
  • 1.确认tensorflow是否与cuda,cudnn对应,在这里查看
  • 2.修改设置
os.environ['CUDA_VISIBLE_DEVICES']='0,1'
# tf 1.13
config = tf.ConfigProto()
config.gpu_options.allow_growth=True
sess = tf.Session(config=config)
sess.run(tf.global_variables_initializer())# tf 2.0
# gpu = tf.config.experimental.list_physical_devices('GPU')
# tf.config.experimental.set_memory_growth(gpu[0], True)
# gpu = tf.config.experimental.list_physical_devices('GPU')
# tf.config.experimental.set_memory_growth(gpu[1], True)
  相关解决方案