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

Function GenDenseConf

examples/cpp/cifar10/cnn.cc:80–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80LayerConf GenDenseConf(string name, int num_output, float std, float wd) {
81 LayerConf conf;
82 conf.set_name(name);
83 conf.set_type("singa_dense");
84 DenseConf *dense = conf.mutable_dense_conf();
85 dense->set_num_output(num_output);
86
87 ParamSpec *wspec = conf.add_param();
88 wspec->set_name(name + "_weight");
89 wspec->set_decay_mult(wd);
90 auto wfill = wspec->mutable_filler();
91 wfill->set_type("Gaussian");
92 wfill->set_std(std);
93
94 ParamSpec *bspec = conf.add_param();
95 bspec->set_name(name + "_bias");
96 bspec->set_lr_mult(2);
97 bspec->set_decay_mult(0);
98
99 return conf;
100}
101
102LayerConf GenLRNConf(string name) {
103 LayerConf conf;

Callers 1

CreateNetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected