MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / parse_convolutional

Function parse_convolutional

yolo_detector/darknet_opt/src/parser.c:169–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168
169convolutional_layer parse_convolutional(list *options, size_params params)
170{
171 int n = option_find_int(options, "filters",1);
172 int size = option_find_int(options, "size",1);
173 int stride = option_find_int(options, "stride",1);
174 int pad = option_find_int_quiet(options, "pad",0);
175 int padding = option_find_int_quiet(options, "padding",0);
176 int groups = option_find_int_quiet(options, "groups", 1);
177 if(pad) padding = size/2;
178
179 char *activation_s = option_find_str(options, "activation", "logistic");
180 ACTIVATION activation = get_activation(activation_s);
181
182 int batch,h,w,c;
183 h = params.h;
184 w = params.w;
185 c = params.c;
186 batch=params.batch;
187 if(!(h && w && c)) error("Layer before convolutional layer must output image.");
188 int batch_normalize = option_find_int_quiet(options, "batch_normalize", 0);
189 int binary = option_find_int_quiet(options, "binary", 0);
190 int xnor = option_find_int_quiet(options, "xnor", 0);
191
192 convolutional_layer layer = make_convolutional_layer(batch,h,w,c,n,groups,size,stride,padding,activation, batch_normalize, binary, xnor, params.net->adam);
193 layer.flipped = option_find_int_quiet(options, "flipped", 0);
194 layer.dot = option_find_float_quiet(options, "dot", 0);
195
196 return layer;
197}
198
199layer parse_crnn(list *options, size_params params)
200{

Callers 1

parse_network_cfgFunction · 0.85

Calls 7

option_find_intFunction · 0.85
option_find_int_quietFunction · 0.85
option_find_strFunction · 0.85
get_activationFunction · 0.85
errorFunction · 0.85
make_convolutional_layerFunction · 0.85
option_find_float_quietFunction · 0.85

Tested by

no test coverage detected