"Caffe-windows" Caffe-master cifar10 Super Detail

Source: Internet
Author: User

This tutorial as far as possible, most of the steps have a diagram, if you run an error, please check your own files and the same as on the map, including punctuation ah, space Ah, slash, anti-slash ah, such as small details.

This routine is performed under the Win10 64-bit Caffe-master vs2013, and the GPU version has been configured and, if CPU, changed in Cifar10_quick_solver.prototxt

# Solver MODE:CPU or GPU

Solver_mode:cpu

Abstract: Caffe example under Win10: Cifar10

The first step:

Download the bin format cifar10:http://www.cs.toronto.edu/~kriz/cifar.html

Unzip stored in: Caffe-master\examples\cifar10\input_folder (Input_folder folder needs to be created by itself)

Step Two:

Under Caffe-master\examples\cifar10, create a notepad (suffix. bat) and enter the following code

Convert_cifar_data.exe Input_folder output_folders Leveldb

Pause

Save as Convert_cifar10.bat (suffix changed to. bat)

Then double-click Run and you can see that a folder is generated under Caffe-master\examples\cifar10, Output_folders. It's stored in the converted data.

Step Three:

Calculate the mean file: Mean.binaryproto

First make sure that you have convert_cifar_data.exe under Caffe-master\build\x64\release, if not, open Caffe.sln, set Compute_image_mean as the startup project, And then Ctrl+f5, waiting for the compilation to end, there's Convert_cifar_data.exe under Caffe-master\build\x64\release.

With Convert_cifar_data.exe, we're going to create a notepad under caffe-master\examples\cifar10 (suffix to. bat), enter the following code

.. \.. \build\x64\release\compute_image_mean.exe-backend=leveldb. /.. /examples\cifar10\output_folders\cifar10_train_leveldbmean.binaryproto

Pause

Then run this file and the Mean.binaryproto file will appear under Caffe-master\examples\cifar10

Fourth Step:

Changing the Cifar10_quick_solver.prototxt and Cifar10_quick_train_test.prototxt under CAFFE-MASTER\EXAMPLES\CIFAR10 is primarily a path change

My cifar10_quick_solver.prototxt has changed:

NET: ". /.. /examples/cifar10/cifar10_quick_train_test.prototxt "

Snapshot_prefix: ". /.. /examples/cifar10/cifar10_quick "

Changed in Cifar10_quick_train_test.prototxt:

Mean_file: ". /.. /examples/cifar10/mean.binaryproto "

Source: ".. /.. /examples/cifar10/output_folders/cifar10_train_leveldb "

Mean_file: ". /.. /examples/cifar10/mean.binaryproto "

Source: ".. /.. /examples/cifar10/output_folders/cifar10_test_leveldb "

and BACKEND:LEVELDB (there are two places!) )

Fifth Step:

After you have changed two files, you can run Caffe to train, there are two ways, one is to write batch file bat, one is to run directly in vs2013

First of all, create a text file under Caffe-master\examples\cifar10, change the suffix to. bat, and copy the following code:

.. \.. \build\x64\release\caffe.exe train--solver=. /.. /examples/cifar10/cifar10_quick_solver.prototxt

Pause

Once saved, you can run it.

The second method is done in vs2013, first set the Caffe as the startup project:

Then click Properties, Find debugging, enter in the command parameters: Train--solver=. /.. /examples/cifar10/cifar10_quick_solver.prototxt

Click OK, Ctrl+f5 can

"Caffe-windows" Caffe-master cifar10 Super Detail

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.