我想使用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));