Python 在抛出';std::bad#u alloc';训练CNN的时候
我正在训练3d密集型CNN。我有12GB的GPU和128GB的RAM。训练发生在GPU上,但交叉验证发生在RAM上,因此我在训练之间得到了上述错误(CV使用所有RAM)。我希望培训和简历都能使用GPU资源 该模型的参数约为3M,我使用的批量大小为1(用于培训和简历) 我使用以下命令来指定GPU-Python 在抛出';std::bad#u alloc';训练CNN的时候,python,tensorflow,deep-learning,gpu,image-segmentation,Python,Tensorflow,Deep Learning,Gpu,Image Segmentation,我正在训练3d密集型CNN。我有12GB的GPU和128GB的RAM。训练发生在GPU上,但交叉验证发生在RAM上,因此我在训练之间得到了上述错误(CV使用所有RAM)。我希望培训和简历都能使用GPU资源 该模型的参数约为3M,我使用的批量大小为1(用于培训和简历) 我使用以下命令来指定GPU- terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)
os.environ[CUDA_VISIBLE_DEIVCES] = '0'
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.allow_soft_placement = True
sess = tf.Session(config=config)