美文网首页
Tensorflow中遇到的问题及解决办法

Tensorflow中遇到的问题及解决办法

作者: 超超超超超超超超级玛丽 | 来源:发表于2017-12-28 11:46 被阅读0次

在使用Tensorflow跑代码的时候遇到一些问题,卡了好几天,现在终于解决了,记录如下:


1、libcusolver.so.8.0:cannot open shared object file: No such file or directory

解决办法:

        首先,检查~/.bashrc 文件中是否有LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64。并且libcusolver.so.8.0在cuda-8.0/lib64目录下。

        那么在终端中执行 

        sudo ldconfig /usr/local/cuda-8.0/lib64

即可解决。

(ps: 在root权限下遇到此问题)


2、if not enough GPU memory ,please edit the code

解决办法:

        将.py中的

        with tf.Session() as sess:

        修改为:

        with tf.Session(config=tf.configProto(allow_soft_placement=True)) as sess:


3、如何在root 权限下进入jupyter notebook?

解决方法:

        jupyter notebook --allow-root


相关文章

网友评论

      本文标题:Tensorflow中遇到的问题及解决办法

      本文链接:https://www.haomeiwen.com/subject/jammgxtx.html