failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED 错误解决方法

解决:

config = tf.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.Session(config=config, ...)

还有这样的(固定分配):

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

记得关闭其他用显存的程序哦!。。。

猜你喜欢

转载自www.cnblogs.com/gaofighting/p/11059752.html
今日推荐