small bug in forward_network_gpu

This commit is contained in:
Joseph Redmon 2015-07-29 11:37:07 -07:00
parent fdcc096694
commit 98813ad520
3 changed files with 5 additions and 5 deletions

View File

@ -41,9 +41,9 @@ void train_captcha2(char *cfgfile, char *weightfile)
//net.seen=0;
int imgs = 1024;
int i = net.seen/imgs;
int solved = 0;
int solved = 1;
list *plist;
char **labels = get_labels("/data/captcha/reimgs.labels2.list");
char **labels = get_labels("/data/captcha/reimgs.labels.list");
if (solved){
plist = get_paths("/data/captcha/reimgs.solved.list");
}else{
@ -95,7 +95,7 @@ void test_captcha2(char *cfgfile, char *weightfile, char *filename)
set_batch_network(&net, 1);
srand(2222222);
int i = 0;
char **names = get_labels("/data/captcha/reimgs.labels2.list");
char **names = get_labels("/data/captcha/reimgs.labels.list");
char input[256];
int indexes[26];
while(1){

View File

@ -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 % 30000) == 0) net.learning_rate *= .1;
if((i % 35000) == 0) net.learning_rate *= .1;
if(i%1000==0){
char buff[256];
sprintf(buff, "/home/pjreddie/imagenet_backup/%s_%d.weights",base, i);

View File

@ -33,7 +33,7 @@ void forward_network_gpu(network net, network_state state)
int i;
for(i = 0; i < net.n; ++i){
layer l = net.layers[i];
if(l.delta){
if(l.delta_gpu){
scal_ongpu(l.outputs * l.batch, 0, l.delta_gpu, 1);
}
if(l.type == CONVOLUTIONAL){