MCPcopy Create free account
hub / github.com/apache/singa / CreateNet

Function CreateNet

examples/cpp/cifar10/cnn.cc:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120FeedForwardNet CreateNet() {
121 FeedForwardNet net;
122 Shape s{3, 32, 32};
123
124 net.Add(GenConvConf("conv1", 32, 5, 1, 2, 0.0001), &s);
125 net.Add(GenPoolingConf("pool1", true, 3, 2, 1));
126 net.Add(GenReLUConf("relu1"));
127 net.Add(GenLRNConf("lrn1"));
128 net.Add(GenConvConf("conv2", 32, 5, 1, 2, 0.01));
129 net.Add(GenReLUConf("relu2"));
130 net.Add(GenPoolingConf("pool2", false, 3, 2, 1));
131 net.Add(GenLRNConf("lrn2"));
132 net.Add(GenConvConf("conv3", 64, 5, 1, 2, 0.01));
133 net.Add(GenReLUConf("relu3"));
134 net.Add(GenPoolingConf("pool3", false, 3, 2, 1));
135 net.Add(GenFlattenConf("flat"));
136 net.Add(GenDenseConf("ip", 10, 0.01, 250));
137 return net;
138}
139
140void Train(int num_epoch, string data_dir) {
141 Cifar10 data(data_dir);

Callers 1

TrainFunction · 0.70

Calls 7

AddMethod · 0.80
GenConvConfFunction · 0.70
GenPoolingConfFunction · 0.70
GenReLUConfFunction · 0.70
GenLRNConfFunction · 0.70
GenFlattenConfFunction · 0.70
GenDenseConfFunction · 0.70

Tested by

no test coverage detected