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

Function GenDenseConf

examples/cpp/cifar10/cnn-parallel.cc:82–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

CreateNetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected