caffe first experience

caffe is a deep learning framework, specifically I do not know, you can own Baidu it, I just know that there is such a framework, ignorant ah.

After installing caffe, my first thought was, never mind that he is Gesha thing, gotta let me run some look at it. Just, official ready some data for us to run the look use.

Because I was installed by docker, so did not experience the tedious process of installing Internet caffe said.

Test 1

In the data / mnist directory, a file get_mnist.sh for acquiring data sets, running

./get_mnist.sh

1560080753754

Once downloaded, the file will now appear in the current directory

1560080803230

With the data, the next step is to convert the data into a format caffe understanding of the conversion process is also directly call caffe file can be defined, in the examples / mnist directory, there are create_mnist.sh file because this file is defined Some paths, so to run caffe root directory:

1560081012666

Two converted file folder as follows:

1560081080000

The current configuration files in the folder (on the configuration parameters in the file will not consider):

  • lenet_train_test.prototxt: definition of the network structure
  • lenet_solver.prototxt: define the parameters of training

Here we need to modify lenet_solver.prototxt in solver_mode, if your environment does not support GPU, modify the CPU.

1560082527649

Training run directly defined script, caffe back to the root directory, run ./examples/mnist/train_lenet.sh (the script defines a caffe Training Command)

1560083757139

Because the notebook PC performance issues, ten thousand times iteration of a long time to see results, you can see, the accuracy rate has reached 99%

1560085427277

The trained model file in the examples / mnist catalog:

1560085798287

So far, this government has completed training examples,

Looks like this is a handwritten numeral recognition training, but I did not see a figure in the training process ah, no, I did not see a picture, ah, what the hell ?? This model trained how to use ??

Well, at least I would be an example to follow official running the first case.


Read a headline test, the test is not that there are two? Haha, sorry, no, to this end, leave.

Guess you like

Origin www.cnblogs.com/hujingnb/p/10994978.html