| 205 | } |
| 206 | |
| 207 | void 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 | |
| 225 | int yolo_num_detections(layer l, float thresh) |
| 226 | { |
no test coverage detected