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

Function parse_deconvolutional

yolo_detector/darknet_opt/src/parser.c:143–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143layer parse_deconvolutional(list *options, size_params params)
144{
145 int n = option_find_int(options, "filters",1);
146 int size = option_find_int(options, "size",1);
147 int stride = option_find_int(options, "stride",1);
148
149 char *activation_s = option_find_str(options, "activation", "logistic");
150 ACTIVATION activation = get_activation(activation_s);
151
152 int batch,h,w,c;
153 h = params.h;
154 w = params.w;
155 c = params.c;
156 batch=params.batch;
157 if(!(h && w && c)) error("Layer before deconvolutional layer must output image.");
158 int batch_normalize = option_find_int_quiet(options, "batch_normalize", 0);
159 int pad = option_find_int_quiet(options, "pad",0);
160 int padding = option_find_int_quiet(options, "padding",0);
161 if(pad) padding = size/2;
162
163 layer l = make_deconvolutional_layer(batch,h,w,c,n,size,stride,padding, activation, batch_normalize, params.net->adam);
164
165 return l;
166}
167
168
169convolutional_layer parse_convolutional(list *options, size_params params)

Callers 1

parse_network_cfgFunction · 0.85

Calls 6

option_find_intFunction · 0.85
option_find_strFunction · 0.85
get_activationFunction · 0.85
errorFunction · 0.85
option_find_int_quietFunction · 0.85

Tested by

no test coverage detected