00001 <?xml version="1.0" encoding="UTF-8"?> 00002 <!-- /* --> 00003 <net name="sample" creator="Akhmed Umyarov"> 00004 <info> 00005 This is a template of config file for convolutional network. 00006 1) connection tag contains weights for the connection of 00007 the plane to its parent planes (from-left-to-right, then row-by-row 00008 from-top-to-bottom) 00009 2) bias has a special tag 00010 3) each plane has its own id, type, featuremap size and window size 00011 of its neuron 00012 4) there are several types of planes including 00013 "source plane" (data abstraction specifying size of source image), 00014 "convolution plane", 00015 "subsampling plane", 00016 "max plane" (data abstraction for output decision) 00017 Each plane has exactly one feature map, so you can think of the 00018 plane as a neuron with its attached featuremap. 00019 </info> 00020 00021 <!-- Source image --> 00022 <plane id="src" type="source" featuremapsize="32x32"> 00023 </plane> 00024 00025 <!-- Layer C1: 4 planes --> 00026 <plane id="C1-1" type="convolution" featuremapsize="28x28" neuronsize="5x5"> 00027 <bias> 1.0 </bias> 00028 <connection to="src"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00029 </plane> 00030 <plane id="C1-2" type="convolution" featuremapsize="28x28" neuronsize="5x5"> 00031 <bias> 1.0 </bias> 00032 <connection to="src"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00033 </plane> 00034 <plane id="C1-3" type="convolution" featuremapsize="28x28" neuronsize="5x5"> 00035 <bias> 1.0 </bias> 00036 <connection to="src"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00037 </plane> 00038 <plane id="C1-4" type="convolution" featuremapsize="28x28" neuronsize="5x5"> 00039 <bias> 1.0 </bias> 00040 <connection to="src"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00041 </plane> 00042 00043 <!-- Layer S2: 4 planes --> 00044 <plane id="S2-1" type="subsampling" featuremapsize="14x14" neuronsize="2x2"> 00045 <bias> 1.0 </bias> 00046 <connection to="C1-1"> 1.0 </connection> 00047 </plane> 00048 <plane id="S2-2" type="subsampling" featuremapsize="14x14" neuronsize="2x2"> 00049 <bias> 1.0 </bias> 00050 <connection to="C1-2"> 1.0 </connection> 00051 </plane> 00052 <plane id="S2-3" type="subsampling" featuremapsize="14x14" neuronsize="2x2"> 00053 <bias> 1.0 </bias> 00054 <connection to="C1-3"> 1.0 </connection> 00055 </plane> 00056 <plane id="S2-4" type="subsampling" featuremapsize="14x14" neuronsize="2x2"> 00057 <bias> 1.0 </bias> 00058 <connection to="C1-4"> 1.0 </connection> 00059 </plane> 00060 00061 <!-- And now layer C3: only 2 planes --> 00062 <plane id="C3-1" type="convolution" featuremapsize="10x10" neuronsize="5x5"> 00063 <bias> 1.0 </bias> 00064 <connection to="S2-1"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00065 <connection to="S2-2"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00066 <connection to="S2-3"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00067 </plane> 00068 <plane id="C3-2" type="convolution" featuremapsize="10x10" neuronsize="5x5"> 00069 <bias> 1.0 </bias> 00070 <connection to="S2-2"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00071 <connection to="S2-3"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00072 <connection to="S2-4"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00073 </plane> 00074 00075 <!-- Here goes layer S4 --> 00076 <plane id="S4-1" type="subsampling" featuremapsize="5x5" neuronsize="2x2"> 00077 <bias> 1.0 </bias> 00078 <connection to="C3-1"> 1.0 </connection> 00079 </plane> 00080 <plane id="S4-2" type="subsampling" featuremapsize="5x5" neuronsize="2x2"> 00081 <bias> 1.0 </bias> 00082 <connection to="C3-2"> 1.0 </connection> 00083 </plane> 00084 00085 <!-- Layer C5: 2 planes--> 00086 <plane id="C5-1" type="convolution" featuremapsize="1x1" neuronsize="5x5"> 00087 <bias> 0.0 </bias> 00088 <connection to="S4-1"> 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 </connection> 00089 <connection to="S4-2"> 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 </connection> 00090 </plane> 00091 <plane id="C5-2" type="convolution" featuremapsize="1x1" neuronsize="5x5"> 00092 <bias> 1.0 </bias> 00093 <connection to="S4-1"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00094 <connection to="S4-2"> 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 </connection> 00095 </plane> 00096 00097 <!-- "Output" neuron: --> 00098 <!-- program abstraction for choosing maximum of C5 layer --> 00099 <plane id="output" type="max"> 00100 <connection to="C5-1"> </connection> 00101 <connection to="C5-2"> </connection> 00102 </plane> 00103 </net> 00104 <!-- */ -->