| | |
| | | #include <string.h> |
| | | #include <stdlib.h> |
| | | |
| | | layer make_yolo_layer(int batch, int w, int h, int n, int total, int *mask, int classes) |
| | | layer make_yolo_layer(int batch, int w, int h, int n, int total, int *mask, int classes, int max_boxes) |
| | | { |
| | | int i; |
| | | layer l = {0}; |
| | |
| | | l.bias_updates = calloc(n*2, sizeof(float)); |
| | | l.outputs = h*w*n*(classes + 4 + 1); |
| | | l.inputs = l.outputs; |
| | | l.truths = 90*(4 + 1); |
| | | l.max_boxes = max_boxes; |
| | | l.truths = l.max_boxes*(4 + 1); // 90*(4 + 1); |
| | | l.delta = calloc(batch*l.outputs, sizeof(float)); |
| | | l.output = calloc(batch*l.outputs, sizeof(float)); |
| | | for(i = 0; i < total*2; ++i){ |