tensorflow C ++ API set_per_process_gpu_memory_fraction(0.5),但是失败了

时间:2018-12-14 08:22:31

标签: tensorflow gpu

我想使用tensorflow1.8 C ++ API限制GPU的内存,但是失败了。 tensorflow :: SessionOptions opts;

double u_r=0.5;//u_r is any !0 value.
opts.config.mutable_gpu_options()->set_per_process_gpu_memory_fraction(u_r);//correct
    //faild,and error is:segmentation error 
     pstTFParas->status = NewSession(opts, &(pstTFParas->session));

0 个答案:

没有答案