您的位置:首页 > 其它

深度学习框架 TensorFlow 常见问题总结

2017-01-23 15:38 351 查看
1.Checkfailed:s.ok()couldnotfindcudnnCreateincudnnDSO;  tensorflow/stream_executor/cuda/cuda_dnn.cc:221]Checkfailed:s.ok()couldnotfindcudnnCreateincudnnDSO;dlerror:/home/wangxiao/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so:undefinedsymbol:cudnnCreate  Aborted    参考了博文:http://blog.csdn.net/jk123vip/article/details/50361951  下载了cudnn-6.5-linux-x64-v2.tgz并且按照上面说的安装完毕后,发现,原本的错误是没了,但是有了新的错误提示:     Etensorflow/stream_executor/cuda/cuda_dnn.cc:378]LoadedruntimeCuDNNlibrary:2000(compatibilityversion2000)butsourcewascompiledwith5105(compatibilityversion5100).Ifusingabinaryinstall,upgradeyourCuDNNlibrarytomatch.Ifbuildingfromsources,makesurethelibraryloadedatruntimematchesacompatibleversionspecifiedduringcompileconfiguration.  Ftensorflow/core/kernels/conv_ops.cc:532]Checkfailed:stream->parent()->GetConvolveAlgorithms(&algorithms)  Aborted  又参考博文:http://blog.csdn.net/gongchangsan/article/details/52573254  上面提示说是CUDNN的版本太低导致的。我呵呵。。。    好吧,去安装cudnn7.5  鉴于我自己的cuda版本是8.0,我下载了cudnn-8.0-linux-x64-v5.1.tgz安装后,还是这个鬼问题。。。。查了几个博文,都说是cudnn版本太低的原因。  http://blog.csdn.net/gavin__zhou/article/details/52693837    心塞啊,难道是没装上?  2.如何在Linux系统中,只复制文件夹,而不拷贝文件夹内部的文件?只是文件夹的复制。。。  答:可以参考:http://stackoverflow.com/questions/4073969/copy-folder-structure-sans-files-from-one-location-to-another    亲测有效:
    cd/path/to/directories&&
    find.-typed-execmkdir-p--/path/to/backup/{}\;
  
   即:进入你想复制的文件夹内部,然后执行
find.-typed-execmkdir-p--/你想拷贝的文件路径/{}\;
   就这样,就完毕了。。。

3.KerasVGG16中ValueError:filtermustnotbelargerthantheinput问题的解决

thesolutionsarelearningfromhttp://blog.csdn.net/u013920434/article/details/53443757解决方法:方法一:假设输入为:model.add(ZeroPadding2D((1,1),batch_input_shape=(1,3,img_width,img_height)))
将其改为
:
model.add(ZeroPadding2D((1,1),batch_input_shape=(1,img_width,img_height,3)))方法二:在网络层明确指明:
image_dim_ordering,
即输入图像的维度次序
;
例如加上如下语句
:
fromkerasimportbackendasKifK.image_dim_ordering()=='th':model.add(ZeroPadding2D((1,1),batch_input_shape=(1,3,img_width,img_height)))else:model.add(ZeroPadding2D((1,1),batch_input_shape=(1,img_width,img_height,3)))
方法三
:
修改文件’
~/.keras/keras.json’
中的’
tf
为’
th
’.
Reference:
http://stackoverflow.com/questions/39848466/tensorflow-keras-convolution2d-valueerror-filter-must-not-be-larger-than-t
  
  
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: