017463a053e7007ffdc48fcd60ff5faeea4eea22
[jacinto-ai/caffe-jacinto.git] / src / caffe / test / lenet.hpp
1 // Copyright Yangqing Jia 2013
3 // This file is merely here so we can easily get a string of the lenet.
4 // It is actually not the very original LeNet, but with the sigmoid layers
5 // replaced by ReLU layers.
7 #ifndef CAFFE_TEST_LENET_HPP_
8 #define CAFFE_TEST_LENET_HPP_
10 #include <string>
12 namespace caffe {
14 const char* kLENET = "name: \"LeNet\"\n"
15 "bottom: \"data\"\n"
16 "bottom: \"label\"\n"
17 "layers {\n"
18 "  layer {\n"
19 "    name: \"conv1\"\n"
20 "    type: \"conv\"\n"
21 "    num_output: 20\n"
22 "    kernelsize: 5\n"
23 "    stride: 1\n"
24 "    weight_filler {\n"
25 "      type: \"xavier\"\n"
26 "    }\n"
27 "    bias_filler {\n"
28 "      type: \"constant\"\n"
29 "    }\n"
30 "  }\n"
31 "  bottom: \"data\"\n"
32 "  top: \"conv1\"\n"
33 "}\n"
34 "layers {\n"
35 "  layer {\n"
36 "    name: \"pool1\"\n"
37 "    type: \"pool\"\n"
38 "    kernelsize: 2\n"
39 "    stride: 2\n"
40 "    pool: MAX\n"
41 "  }\n"
42 "  bottom: \"conv1\"\n"
43 "  top: \"pool1\"\n"
44 "}\n"
45 "layers {\n"
46 "  layer {\n"
47 "    name: \"conv2\"\n"
48 "    type: \"conv\"\n"
49 "    num_output: 50\n"
50 "    kernelsize: 5\n"
51 "    stride: 1\n"
52 "    weight_filler {\n"
53 "      type: \"xavier\"\n"
54 "    }\n"
55 "    bias_filler {\n"
56 "      type: \"constant\"\n"
57 "    }\n"
58 "  }\n"
59 "  bottom: \"pool1\"\n"
60 "  top: \"conv2\"\n"
61 "}\n"
62 "layers {\n"
63 "  layer {\n"
64 "    name: \"pool2\"\n"
65 "    type: \"pool\"\n"
66 "    kernelsize: 2\n"
67 "    stride: 2\n"
68 "    pool: MAX\n"
69 "  }\n"
70 "  bottom: \"conv2\"\n"
71 "  top: \"pool2\"\n"
72 "}\n"
73 "layers {\n"
74 "  layer {\n"
75 "    name: \"ip1\"\n"
76 "    type: \"innerproduct\"\n"
77 "    num_output: 500\n"
78 "    weight_filler {\n"
79 "      type: \"xavier\"\n"
80 "    }\n"
81 "    bias_filler {\n"
82 "      type: \"constant\"\n"
83 "    }\n"
84 "  }\n"
85 "  bottom: \"pool2\"\n"
86 "  top: \"ip1\"\n"
87 "}\n"
88 "layers {\n"
89 "  layer {\n"
90 "    name: \"relu1\"\n"
91 "    type: \"relu\"\n"
92 "  }\n"
93 "  bottom: \"ip1\"\n"
94 "  top: \"relu1\"\n"
95 "}\n"
96 "layers {\n"
97 "  layer {\n"
98 "    name: \"ip2\"\n"
99 "    type: \"innerproduct\"\n"
100 "    num_output: 10\n"
101 "    weight_filler {\n"
102 "      type: \"xavier\"\n"
103 "    }\n"
104 "    bias_filler {\n"
105 "      type: \"constant\"\n"
106 "    }\n"
107 "  }\n"
108 "  bottom: \"relu1\"\n"
109 "  top: \"ip2\"\n"
110 "}\n"
111 "layers {\n"
112 "  layer {\n"
113 "    name: \"prob\"\n"
114 "    type: \"softmax\"\n"
115 "  }\n"
116 "  bottom: \"ip2\"\n"
117 "  top: \"prob\"\n"
118 "}\n"
119 "layers {\n"
120 "  layer {\n"
121 "    name: \"loss\"\n"
122 "    type: \"multinomial_logistic_loss\"\n"
123 "  }\n"
124 "  bottom: \"prob\"\n"
125 "  bottom: \"label\"\n"
126 "}";
128 }  // namespace caffe
130 #endif