From 98813ad520e39541fbe3607ebb2f2519936955c7 Mon Sep 17 00:00:00 2001 From: Joseph Redmon Date: Wed, 29 Jul 2015 11:37:07 -0700 Subject: [PATCH] small bug in forward_network_gpu --- src/captcha.c | 6 +++--- src/imagenet.c | 2 +- src/network_kernels.cu | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/captcha.c b/src/captcha.c index f47b35e1..772f9d7c 100644 --- a/src/captcha.c +++ b/src/captcha.c @@ -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){ diff --git a/src/imagenet.c b/src/imagenet.c index 96e74d0a..8682e6a2 100644 --- a/src/imagenet.c +++ b/src/imagenet.c @@ -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); diff --git a/src/network_kernels.cu b/src/network_kernels.cu index 6562590c..3340afae 100644 --- a/src/network_kernels.cu +++ b/src/network_kernels.cu @@ -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){