Joseph Redmon
2016-11-16 fc9b867dd9c9a6d38d7fe478217060e11b9e7e1b
:fire: :fire: :dragonite:
9 files modified
23 ■■■■■ changed files
src/avgpool_layer.c 2 ●●● patch | view | raw | blame | history
src/connected_layer.c 2 ●●● patch | view | raw | blame | history
src/convolutional_layer.c 2 ●●● patch | view | raw | blame | history
src/cost_layer.c 2 ●●● patch | view | raw | blame | history
src/detector.c 6 ●●●● patch | view | raw | blame | history
src/dropout_layer.c 2 ●●● patch | view | raw | blame | history
src/maxpool_layer.c 2 ●●● patch | view | raw | blame | history
src/parser.c 3 ●●●● patch | view | raw | blame | history
src/softmax_layer.c 2 ●●● patch | view | raw | blame | history
src/avgpool_layer.c
@@ -4,7 +4,7 @@
avgpool_layer make_avgpool_layer(int batch, int w, int h, int c)
{
    fprintf(stderr, "Avgpool Layer: %d x %d x %d image\n", w,h,c);
    fprintf(stderr, "avg                     %4d x%4d x%4d   ->  %4d\n",  w, h, c, c);
    avgpool_layer l = {0};
    l.type = AVGPOOL;
    l.batch = batch;
src/connected_layer.c
@@ -100,7 +100,7 @@
    }
#endif
    l.activation = activation;
    fprintf(stderr, "Connected Layer: %d inputs, %d outputs\n", inputs, outputs);
    fprintf(stderr, "connected                            %4d  ->  %4d\n", inputs, outputs);
    return l;
}
src/convolutional_layer.c
@@ -300,7 +300,7 @@
    l.workspace_size = get_workspace_size(l);
    l.activation = activation;
    fprintf(stderr, "Convolutional Layer: %d x %d x %d image, %d filters -> %d x %d x %d image\n", h,w,c,n, out_h, out_w, n);
    fprintf(stderr, "conv  %5d %2d x%2d /%2d  %4d x%4d x%4d   ->  %4d x%4d x%4d\n", n, size, size, stride, w, h, c, l.out_w, l.out_h, l.out_c);
    return l;
}
src/cost_layer.c
@@ -31,7 +31,7 @@
cost_layer make_cost_layer(int batch, int inputs, COST_TYPE cost_type, float scale)
{
    fprintf(stderr, "Cost Layer: %d inputs\n", inputs);
    fprintf(stderr, "cost                                           %4d\n",  inputs);
    cost_layer l = {0};
    l.type = COST;
src/detector.c
@@ -136,15 +136,19 @@
        i = get_current_batch(net);
        printf("%d: %f, %f avg, %f rate, %lf seconds, %d images\n", get_current_batch(net), loss, avg_loss, get_current_rate(net), sec(clock()-time), i*imgs);
        if(i%100==0 || (i < 1000 && i%100 == 0)){
        if(i%1000==0 || (i < 1000 && i%100 == 0)){
#ifdef GPU
            if(ngpus != 1) sync_nets(nets, ngpus, 0);
#endif
            char buff[256];
            sprintf(buff, "%s/%s_%d.weights", backup_directory, base, i);
            save_weights(net, buff);
        }
        free_data(train);
    }
#ifdef GPU
    if(ngpus != 1) sync_nets(nets, ngpus, 0);
#endif
    char buff[256];
    sprintf(buff, "%s/%s_final.weights", backup_directory, base);
    save_weights(net, buff);
src/dropout_layer.c
@@ -6,7 +6,6 @@
dropout_layer make_dropout_layer(int batch, int inputs, float probability)
{
    fprintf(stderr, "Dropout Layer: %d inputs, %f probability\n", inputs, probability);
    dropout_layer l = {0};
    l.type = DROPOUT;
    l.probability = probability;
@@ -22,6 +21,7 @@
    l.backward_gpu = backward_dropout_layer_gpu;
    l.rand_gpu = cuda_make_array(l.rand, inputs*batch);
    #endif
    fprintf(stderr, "dropout       p = %.2f               %4d  ->  %4d\n", probability, inputs, inputs);
    return l;
src/maxpool_layer.c
@@ -20,7 +20,6 @@
maxpool_layer make_maxpool_layer(int batch, int h, int w, int c, int size, int stride, int padding)
{
    fprintf(stderr, "Maxpool Layer: %d x %d x %d image, %d size, %d stride\n", h,w,c,size,stride);
    maxpool_layer l = {0};
    l.type = MAXPOOL;
    l.batch = batch;
@@ -48,6 +47,7 @@
    l.output_gpu  = cuda_make_array(l.output, output_size);
    l.delta_gpu   = cuda_make_array(l.delta, output_size);
    #endif
    fprintf(stderr, "max          %d x %d / %d  %4d x%4d x%4d   ->  %4d x%4d x%4d\n", size, size, stride, w, h, c, l.out_w, l.out_h, l.out_c);
    return l;
}
src/parser.c
@@ -610,9 +610,10 @@
    n = n->next;
    int count = 0;
    free_section(s);
    fprintf(stderr, "layer     filters    size              input                output\n");
    while(n){
        params.index = count;
        fprintf(stderr, "%d: ", count);
        fprintf(stderr, "%5d ", count);
        s = (section *)n->val;
        options = s->options;
        layer l = {0};
src/softmax_layer.c
@@ -10,7 +10,7 @@
softmax_layer make_softmax_layer(int batch, int inputs, int groups)
{
    assert(inputs%groups == 0);
    fprintf(stderr, "Softmax Layer: %d inputs\n", inputs);
    fprintf(stderr, "softmax                                        %4d\n",  inputs);
    softmax_layer l = {0};
    l.type = SOFTMAX;
    l.batch = batch;