🔥 🔥 :dragonite:

This commit is contained in:
Joseph Redmon 2016-11-16 00:15:46 -08:00
parent 648407a5e3
commit fc9b867dd9
9 changed files with 14 additions and 9 deletions

View File

@ -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;

View File

@ -100,7 +100,7 @@ connected_layer make_connected_layer(int batch, int inputs, int outputs, ACTIVAT
}
#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;
}

View File

@ -300,7 +300,7 @@ convolutional_layer make_convolutional_layer(int batch, int h, int w, int c, int
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;
}

View File

@ -31,7 +31,7 @@ char *get_cost_string(COST_TYPE a)
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;

View File

@ -136,15 +136,19 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
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);

View File

@ -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 @@ dropout_layer make_dropout_layer(int batch, int inputs, float probability)
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;
}

View File

@ -20,7 +20,6 @@ image get_maxpool_delta(maxpool_layer l)
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 @@ maxpool_layer make_maxpool_layer(int batch, int h, int w, int c, int size, int s
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;
}

View File

@ -610,9 +610,10 @@ network parse_network_cfg(char *filename)
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};

View File

@ -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;