日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

Caffe: Caffe的Python接口

發布時間:2023/12/31 python 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Caffe: Caffe的Python接口 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

官方參考:http://caffe.berkeleyvision.org/installation.html

官方介紹是這樣的:

Python

The main requirements are numpy and boost.python (provided by boost).pandas is useful too and needed for some examples.

You can install the dependencies with:

for req in $(cat requirements.txt); do pip install $req; done


but we suggest first installing the Anaconda Python distribution, which provides most of the necessary packages, as well as thehdf5 library dependency.

To import the caffe Python module after completing the installation, add the module directory to your$PYTHONPATH byexport PYTHONPATH=/path/to/caffe/python:$PYTHONPATH or the like. You should not import the module in thecaffe/python/caffe directory!


1. 對于:for req in $(cat requirements.txt); do pip install $req; done

這句shell,可能會運行無效,要把requriments 里面的軟件要求順序變更一下,安裝完其他包后,依次安裝ipython和h5dy;


2. 添加caffe的python包含路徑:

你所添加的路徑是:export PYTHONPATH=/home/wishchin/caffe-master/python:$PYTHONPATH

??????????????????????? 而非:export PYTHONPATH=/home/wishchin/caffe-master/python/caffe:$PYTHONPATH

修改后update一下,或者重啟,可以在任一項目中import caffe


3.對于Eclipse,可以在preference-python-Interpretor里面直接添加路徑

注意事項: 若是第一次在Eclipse中引用出現錯誤。Don't panic! 重啟一下eclipse就可以了。


若想在一個工程中引用Caffe,暫時沒有想到可行的方法.....................................................

后記: 在eclipse工程中添加引用目錄,直接import caffe

總結

以上是生活随笔為你收集整理的Caffe: Caffe的Python接口的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。