2018-12-27 | 改代碼,跑DoF map的prediction model

Q:

Exception: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 512, 30, 512), (None, 16, 30, 40)]

作者說是keras.json文件需要改成

{ "image_dim_ordering": "th", "epsilon": 1e-07, "floatx": "float32", "backend": "theano" }

然后就可以跑了耶!ヽ(●′?`●)?
--------------------------分割線----------------------------------------------------------------------
test過程中遇到的warning:

Using Theano backend.
Using cuDNN version 6021 on context None
Mapped name None to device cuda: GeForce GTX 1070 (0000:01:00.0)
/home/yifang/anaconda2/envs/py35/lib/python3.5/site-packages/keras/backend/theano_backend.py:1500: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'.
mode='max')
/home/yifang/anaconda2/envs/py35/lib/python3.5/site-packages/keras/backend/theano_backend.py:1500: UserWarning: DEPRECATION: the 'st' parameter is not going to exist anymore as it is going to be replaced by the parameter 'stride'.
mode='max')
/home/yifang/anaconda2/envs/py35/lib/python3.5/site-packages/keras/backend/theano_backend.py:1500: UserWarning: DEPRECATION: the 'padding' parameter is not going to exist anymore as it is going to be replaced by the parameter 'pad'.
mode='max')

  • theano cudnn不兼容問題,解決過程:
  1. 測試theano能不能用gpu
    theano官網(wǎng):使用gpu

By default, when device indicates preference for GPU computations, Theano will fall back to the CPU if there is a problem with the GPU. You can use the flag force_device=True to instead raise an error when Theano cannot use the GPU.

所以就是有問題,不是設(shè)置問題。

dnn.include_path (<class 'str'>)
Doc: Location of the cudnn header
Value: /usr/local/cuda/include

dnn.library_path (<class 'str'>)
Doc: Location of the cudnn link library.
Value: /usr/local/cuda/lib64

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容