Windows,caffe CPU Only

Source: Internet
Author: User

Http://caffe.berkeleyvision.org/installation.html Press the official website of the steps: Https://github.com/BVLC/caffe/tree/windows Pull down and see the following document (from "http://blog.sina.com.cn/s/blog_144ccf27c0102x0di.html"): I really appreciate this article, here again thank the author of the original, thank you! Environment: VISUAL2013,WINDOWS7,MATLAB2014,ANACONDA,CPU, not installed Cuda and CUDNN official download: Https://github.com/Microsoft/caffe, I downloaded the compressed package and extracted it to F:\caffe-master (1) \caffe-master Open the F:\caffe-master\caffe-master\windows folder, Copy the CommonSettings.props.example, and then rename the CommonSettings.props.example to Commonsettings.props. Open the Commonsettings.props file with visual2013 and modify the corresponding code to the following (red is the modified part):truefalse7.5truetrue(I change the default to true in order to invoke the Python interface)F:\Anaconda2\(The Red section is the Python.exe root directory, note the last slash) (commonsettings.props file modification completed) in F:\caffe-master (1) \caffe-master\ Under Windows, open Caffe.sln with visual2013, right-click "solution Caffe (16 projects)", click "Generate Solution", wait for a while, Caffe the same level directory generates a folder named Nugetpackages (because Microsoft has a very powerful nuget tool, so when we first compile the project, NuGet starts to download and configure these third-party libraries automatically, At the same time, a folder named Nugetpackages is generated in the Caffe directory, which is one of the great conveniences that Microsoft offers, unlike Happynear's Caffe Windows, which requires a variety of caffe-dependent boost, OpenCV, GFlags, Glog and other third-party libraries,Microsoft's NuGet automatically configures these third-party libraries without the need for us to manually configure), the program will continue to run after the library, but there will be 10 errors, the error is divided into two categories, one is "error C2220: Warning is treated as an error-no" object "file", the workaround is to double-click the error to open the file and save, and then compile it can be passed smoothly Second, you will be prompted to say that you cannot open an error such as Libcaffe.lib, the workaround is to regenerate the Libcaffe directly or generate it directly. (There are a few things to note about this process: 1. You may need to turn on the FQ software, otherwise you cannot connect 2. Right-click the solution ' Caffe ' property and select ' Current selection ' instead of ' single-Boot Project '. 3. Right-click the attribute->c/c++, adjust "warning level" to level 3, change "Treat warning as error" to No, or you will treat many warnings as errors, compile failed)   Configure Python interface: When configuring the Python interface, be aware that: 1.set PythonPath environment variable to point to \build\x64\release\pycaffe, or        & nbsp;                               copy folder \Build\x64\Release\ Pycaffe\caffe under \lib\site-packages (build folder only after generating Caffe) 2.pip install PROTOBUF, and after 1 steps are completed, then import Caffe, Should not appear error   After this step is completed, it is best to build again to ensure that the run.bat runs smoothly.   to: http://download.csdn.net/detail/u012878523/8140305 download Mnist-test-leveldb and mnist-train-leveldb two folders and put them in . \example\mnist under. GPU and CPU switching in Lenet_solver.protOtxt modified, the last line to change the GPU to CPU.   Open Lenet_train_test.prototxt, modify parameters. Data_param {    source: "f:/caffe-master (1)/caffe-master/examples/mnist/mnist-train-leveldb"Batch_size:64 Backend:LEVELDB (to capitalize)}} (approximately 14 rows) Data_param {source: "f:/caffe-master (1)/caffe-master/examples/mnist/mnist-test-leveldb"Batch_size:100 Backend:LEVELDB}} (approximately 30 rows or so) write the. bat file as shown below:. \build\x64\release\caffe.exe train--solver=examples/mnist/lenet_ Solver.prototxtpause is saved in Run.bat, and the bat file is saved in the root directory of Caffe. My root directory is the top level directory of the build after double-click to run, no error is configured successfully. There is also a very important point (It took me a long time to find this mistake.), like this line of code Source: "F:/Caffe-master (1)/Caffe-master/Examples/Mnist/Mnist-test-leveldb ", do not write \, pay attention to the direction of the bar, or run Run.bat, will always appear the error is: Libprotobuferror. \src\google\protobuf\text .....

Windows,caffe CPU Only

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.