文章目录
  1. 1. Define the Network
  2. 2. Define the Solver
  3. 3. The actual training command
  4. 4. Training output

Define the Network

  1. Giving the same name to the bottom and top blobs to do in-place operations to save some memory (ReLU)
  2. For the input, it creates two top layers(label and data). For the loss layer, it uses two input layers(label and fully connected)
  3. Layer definitions can include rules for whether and when they are included in the network definition, like the one below:
1
2
3
4
layers {
// ...layer definition...
include: { phase: TRAIN }
}

In the above example, this layer will be included only in TRAIN phase. If we change TRAIN with TEST, then this layer will be used only in test phase. By default, that is without layer rules, a layer is always included in the network.

Define the Solver

  1. have the net description
  2. The number iterations just indicates the number of training patchs, not epochs.
  3. optimization hyper-parameter
  4. Shen and where to save the model

The actual training command

./build/tools/caffe train —solver=examples/mnist/lenet_solver.prototxt

Training output

1
2
3
4
5
I1203 net.cpp:66] Creating Layer conv1
I1203 net.cpp:76] conv1 <- data
I1203 net.cpp:101] conv1 -> conv1
I1203 net.cpp:116] Top shape: 20 24 24
I1203 net.cpp:127] conv1 needs backward computation.

These messages tell you the details about each layer, its connections and its output shape, which may be helpful in debugging.
For each training iteration, lr is the learning rate of that iteration, and loss is the training function. For the output of the testing phase, score 0 is the accuracy, and score 1 is the testing loss function.

文章目录
  1. 1. Define the Network
  2. 2. Define the Solver
  3. 3. The actual training command
  4. 4. Training output