MCPcopy Create free account
hub / github.com/OAID/Tengine / forward_darknet_layer_cpu

Function forward_darknet_layer_cpu

tests/bin/test_dk_yolo.cpp:207–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void forward_darknet_layer_cpu(const float* input, layer l)
208{
209 memcpy(( void* )l.output, ( void* )input, sizeof(float) * l.inputs * l.batch);
210 if(0 == l.layer_type)
211 {
212 for(int b = 0; b < l.batch; ++b)
213 {
214 for(int n = 0; n < l.n; ++n)
215 {
216 int index = entry_index(l, b, n * l.w * l.h, 0);
217 logistic_cpu(l.output + index, 2 * l.w * l.h);
218 index = entry_index(l, b, n * l.w * l.h, 4);
219 logistic_cpu(l.output + index, (1 + l.classes) * l.w * l.h);
220 }
221 }
222 }
223}
224
225int yolo_num_detections(layer l, float thresh)
226{

Callers 1

mainFunction · 0.70

Calls 2

entry_indexFunction · 0.70
logistic_cpuFunction · 0.70

Tested by

no test coverage detected