failed to allocate 5.91G (6347372032 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
import tensorflow as tf gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333) sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
试试