tensorflow中GPU相關設定解決視訊記憶體不足
阿新 • • 發佈:2019-02-17
1.視訊記憶體不足時報錯如下:
E tensorflow/stream_executor/cuda/cuda_dnn.cc:359] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERRORE tensorflow/stream_executor/cuda/cuda_dnn.cc:326] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM2018-03-12 10:55:56.078991: F tensorflow/core/kernels/conv_ops.cc:671] Check failed: stream->parent()->GetConvolveAlgorithms(&algorithms) Aborted (core dumped)
解決如下:
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=FLAGS.gpu_memory_fraction) config = tf.ConfigProto(log_device_placement=False,gpu_options=gpu_options) saver = tf.train.Saver(tf.global_variables()) summary_op = tf.summary.merge_all() init = tf.initialize_all_variables() sess = tf.Session(config=config)