mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Headers are important
This commit is contained in:
parent
0b4c38f631
commit
f11480833d
@ -110,13 +110,12 @@ void train_coco(char *cfgfile, char *weightfile)
|
||||
save_weights(net, buff);
|
||||
return;
|
||||
}
|
||||
if(i%1000==0 || 1){
|
||||
if(i%1000==0){
|
||||
char buff[256];
|
||||
sprintf(buff, "%s/%s_%d.weights", backup_directory, base, i);
|
||||
save_weights(net, buff);
|
||||
}
|
||||
free_data(train);
|
||||
return;
|
||||
}
|
||||
char buff[256];
|
||||
sprintf(buff, "%s/%s_final.weights", backup_directory, base);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
inline void col2im_add_pixel(float *im, int height, int width, int channels,
|
||||
void col2im_add_pixel(float *im, int height, int width, int channels,
|
||||
int row, int col, int channel, int pad, float val)
|
||||
{
|
||||
row -= pad;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "im2col.h"
|
||||
#include <stdio.h>
|
||||
inline float im2col_get_pixel(float *im, int height, int width, int channels,
|
||||
float im2col_get_pixel(float *im, int height, int width, int channels,
|
||||
int row, int col, int channel, int pad)
|
||||
{
|
||||
row -= pad;
|
||||
|
@ -47,7 +47,7 @@ void train_imagenet(char *cfgfile, char *weightfile)
|
||||
avg_loss = avg_loss*.9 + loss*.1;
|
||||
printf("%d: %f, %f avg, %lf seconds, %d images\n", i, loss, avg_loss, sec(clock()-time), net.seen);
|
||||
free_data(train);
|
||||
if((i % 35000) == 0) net.learning_rate *= .1;
|
||||
if((i % 30000) == 0) net.learning_rate *= .1;
|
||||
if(i%1000==0){
|
||||
char buff[256];
|
||||
sprintf(buff, "/home/pjreddie/imagenet_backup/%s_%d.weights",base, i);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "image.h"
|
||||
#include "data.h"
|
||||
#include "utils.h"
|
||||
#include "blas.h"
|
||||
|
||||
#include "crop_layer.h"
|
||||
#include "connected_layer.h"
|
||||
|
@ -236,6 +236,9 @@ dropout_layer parse_dropout(list *options, size_params params)
|
||||
{
|
||||
float probability = option_find_float(options, "probability", .5);
|
||||
dropout_layer layer = make_dropout_layer(params.batch, params.inputs, probability);
|
||||
layer.out_w = params.w;
|
||||
layer.out_h = params.h;
|
||||
layer.out_c = params.c;
|
||||
return layer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user