Summary on deep learning framework --- TensorFlow


 Summary on deep learning framework --- TensorFlow

Updated on 2018-07-22 21:28:11

 

1. Check failed: s.ok() could not find cudnnCreate in cudnn DSO; 

  tensorflow/stream_executor/cuda/cuda_dnn.cc:221] Check failed: s.ok() could not find cudnnCreate in cudnn DSO; dlerror: /home/wangxiao/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: cudnnCreate

  Aborted
  

  參考了博文:http://blog.csdn.net/jk123vip/article/details/50361951 

  下載了 cudnn-6.5-linux-x64-v2.tgz 並且按照上面說的安裝完畢后,發現,原本的錯誤是沒了,但是有了新的錯誤提示: 

  

  E tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 2000 (compatibility version 2000) but source was compiled with 5105 (compatibility version 5100). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
  F tensorflow/core/kernels/conv_ops.cc:532] Check failed: 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 . -type d -exec mkdir -p -- /path/to/backup/{} \; 
  
   即:進入你想復制的文件夾內部,然后執行
find . -type d -exec mkdir -p -- /你想拷貝的文件路徑/{} \;
   就這樣,就完畢了。。。



 

3. Keras VGG16中ValueError: filter must not be larger than the input問題的解決 

the solutions are learning from http://blog.csdn.net/u013920434/article/details/53443757

解決方法:

方法一:

假設輸入為:

 
  1. model.add(ZeroPadding2D((1, 1), batch_input_shape=(1, 3, img_width, img_height)))   

將其改為:

 
  1. model.add(ZeroPadding2D((1, 1), batch_input_shape=(1, img_width, img_height, 3)))  

方法二:

在網絡層明確指明:image_dim_ordering,即輸入圖像的維度次序;

例如加上如下語句:

  1. from keras import backend as K  
  2.      if K.image_dim_ordering() == 'th':  
  3.         model.add(ZeroPadding2D((1, 1), batch_input_shape=(1,3,img_width, img_height)))  
  4.      else:  
  5.         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 

 

  


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM