cifar10训练 test 0.894

name: "CIFAR10_full"
layer {
  name: "cifar"
  type: "Data"
  top: "data"
  top: "label"
  include {
    phase: TRAIN
  }
  transform_param {
    mean_file: "mean.binaryproto"
    #scale:0.00390625
    mirror:1
    crop_size:28
  }
  data_param {
    source: "cifar10_train_lmdb"
    batch_size: 256
    backend: LMDB
  }
}
layer {
  name: "cifar"
  type: "Data"
  top: "data"
  top: "label"
  include {
    phase: TEST
  }
  transform_param {
    mean_file: "mean.binaryproto"
   #scale:0.00390625
    mirror:1
    crop_size: 28
  }
  data_param {
    source: "cifar10_test_lmdb"
    batch_size: 100
    backend: LMDB
  }
}
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  convolution_param {
    num_output: 32
    pad:2
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.0001
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "relu1_1"
  type: "ReLU"
  bottom: "conv1"
  top: "conv1"
}
layer {
  name: "conv1_1"
  type: "Convolution"
  bottom: "conv1"
  top: "conv1_1"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  convolution_param {
    num_output: 32
    pad:1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.0001
    }
    bias_filler {
      type: "constant"
    }
  }
}

layer {
  name: "bn_conv1"
  bottom: "conv1_1"
  top: "conv1_1"
  type: "BatchNorm"
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  batch_norm_param {
     use_global_stats: false
   }
}
layer {
  name: "scale_conv1"
  bottom: "conv1_1"
  top: "conv1_1"
  type: "Scale"
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  scale_param {
  bias_term: true
  }
}

layer {
  name: "pool1"
  type: "Pooling"
  bottom: "conv1_1"
  top: "pool1"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}

layer {
  name: "conv2"
  type: "Convolution"
  bottom: "pool1"
  top: "conv2"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  convolution_param {
    num_output: 32
    pad:2
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "relu2_2"
  type: "ReLU"
  bottom: "conv2"
  top: "conv2"
}
layer {
  name: "conv2_2"
  type: "Convolution"
  bottom: "conv2"
  top: "conv2_2"
  param {
    lr_mult: 1
  }
  param {
    lr_mult: 2
  }
  convolution_param {
    num_output: 32
    pad:1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
    }
  }
}

layer {
  name: "bn_conv2"
  bottom: "conv2_2"
  top: "conv2_2"
  type: "BatchNorm"
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  batch_norm_param {
     use_global_stats: false
   }
}
layer {
  name: "scale_conv2"
  bottom: "conv2_2"
  top: "conv2_2"
  type: "Scale"
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  scale_param {
  bias_term: true
  }
}

layer {
  name: "pool2"
  type: "Pooling"
  bottom: "conv2_2"
  top: "pool2"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}

layer {
  name: "conv3"
  type: "Convolution"
  bottom: "pool2"
  top: "conv3"
  convolution_param {
    num_output: 64
    pad:2
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.05
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "relu3_3"
  type: "ReLU"
  bottom: "conv3"
  top: "conv3"
}
layer {
  name: "conv3_3"
  type: "Convolution"
  bottom: "conv3"
  top: "conv3_3"
  convolution_param {
    num_output: 64
    pad:1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.05
    }
    bias_filler {
      type: "constant"
    }
  }
}

layer {
  name: "bn_conv3"
  bottom: "conv3_3"
  top: "conv3_3"
  type: "BatchNorm"
}
layer {
  name: "bn_conv3"
  bottom: "conv3_3"
  top: "conv3_3"
  type: "BatchNorm"
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  batch_norm_param {
     use_global_stats: false
   }
}
layer {
  name: "scale_conv3"
  bottom: "conv3_3"
  top: "conv3_3"
  type: "Scale"
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  scale_param {
  bias_term: true
  }
}


layer {
  name: "relu3"
  type: "ReLU"
  bottom: "conv3_3"
  top: "conv3_3"
}
layer {
  name: "pool3"
  type: "Pooling"
  bottom: "conv3_3"
  top: "pool3"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "conv4"
  type: "Convolution"
  bottom: "pool3"
  top: "conv4"
  convolution_param {
    num_output: 64
    pad:2
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.05
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "relu4_4"
  type: "ReLU"
  bottom: "conv4"
  top: "conv4"
}
layer {
  name: "conv4_4"
  type: "Convolution"
  bottom: "conv4"
  top: "conv4_4"
  convolution_param {
    num_output: 64
    pad:1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.05
    }
    bias_filler {
      type: "constant"
    }
  }
}

layer {
  name: "bn_conv4"
  bottom: "conv4_4"
  top: "conv4_4"
  type: "BatchNorm"
}
layer {
  name: "bn_conv4"
  bottom: "conv4_4"
  top: "conv4_4"
  type: "BatchNorm"
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  batch_norm_param {
     use_global_stats: false
   }
}
layer {
  name: "scale_conv4"
  bottom: "conv4_4"
  top: "conv4_4"
  type: "Scale"
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  scale_param {
  bias_term: true
  }
}

layer {
  name: "relu4"
  type: "ReLU"
  bottom: "conv4_4"
  top: "conv4_4"
}
layer {
  name: "pool4"
  type: "Pooling"
  bottom: "conv4_4"
  top: "pool4"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "conv5"
  type: "Convolution"
  bottom: "pool4"
  top: "conv5"
  convolution_param {
    num_output: 128
    pad:2
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.05
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "relu5_5"
  type: "ReLU"
  bottom: "conv5"
  top: "conv5"
}
layer {
  name: "conv5_5"
  type: "Convolution"
  bottom: "conv5"
  top: "conv5_5"
  convolution_param {
    num_output: 128
    pad:1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "gaussian"
      std: 0.05
    }
    bias_filler {
      type: "constant"
    }
  }
}

layer {
  name: "bn_conv5"
  bottom: "conv5_5"
  top: "conv5_5"
  type: "BatchNorm"
}
layer {
  name: "bn_conv5"
  bottom: "conv5_5"
  top: "conv5_5"
  type: "BatchNorm"
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  param {
    lr_mult: 0
    decay_mult: 0
    }
  batch_norm_param {
     use_global_stats: false
   }
}
layer {
  name: "scale_conv5"
  bottom: "conv5_5"
  top: "conv5_5"
  type: "Scale"
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  param {
  lr_mult: 0.1
  decay_mult: 0
  }
  scale_param {
  bias_term: true
  }
}

layer {
  name: "relu5"
  type: "ReLU"
  bottom: "conv5_5"
  top: "conv5_5"
}
layer {
  name: "pool5"
  type: "Pooling"
  bottom: "conv5_5"
  top: "pool5"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}


layer {
  name: "ip1"
  type: "InnerProduct"
  bottom: "pool5"
  top: "ip1"
  param {
    lr_mult: 1
    decay_mult: 10
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 128
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
    }
  }
}

layer {
  name: "ip2"
  type: "InnerProduct"
  bottom: "ip1"
  top: "ip2"
  param {
    lr_mult: 1
    decay_mult: 10
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 10
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
    }
  }
}
layer {
  name: "accuracy"
  type: "Accuracy"
  bottom: "ip2"
  bottom: "label"
  top: "accuracy"
  include {
    phase: TEST
  }
}
layer {
  name: "accuracy"
  type: "Accuracy"
  bottom: "ip2"
  bottom: "label"
  top: "accuracy"
  include {
    phase: TRAIN
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "ip2"
  bottom: "label"
  top: "loss"
}

solver:

# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
# then another factor of 10 after 10 more epochs (5000 iters)

# The train/test net protocol buffer definition
net: "cifar10_full_train_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 200
# Carry out testing every 1000 training iterations.
test_interval: 1000
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.0001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
#lr_policy: "multistep"
#gamma:0.1
#stepvalue:5000

lr_policy: "inv"
gamma: 0.0001
power: 0.75

# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 100000
# snapshot intermediate results
snapshot: 10000
#snapshot_format: LMDB
snapshot_prefix: "cifar10_full"
# solver mode: CPU or GPU
solver_mode: GPU
type:"SGD"

截图:

猜你喜欢

转载自blog.csdn.net/LBJ_python/article/details/83626203