Summary on deep learning framework --- TensorFlow

 Summary on deep learning framework --- TensorFlowpython

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

 

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

  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
  
python2.7

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

  下載了 cudnn-6.5-linux-x64-v2.tgz 而且按照上面說的安裝完畢後,發現,本來的錯誤是沒了,可是有了新的錯誤提示: spa

  

  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.net

 

  又參考博文: http://blog.csdn.net/gongchangsan/article/details/52573254 3d

  上面提示說是 CUDNN 的版本過低致使的。我呵呵。。。code

  

 

  好吧,去安裝 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 

相關文章
相關標籤/搜索