From 0dab894a5be9f7d10d85e89dea91d02c71bae84d Mon Sep 17 00:00:00 2001
From: Edmond Yoo <hj3yoo@uwaterloo.ca>
Date: Sun, 16 Sep 2018 03:24:45 +0000
Subject: [PATCH] Moving files from MTGCardDetector repo

---
 src/captcha.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/captcha.c b/src/captcha.c
index 4e77ce2..3d449b2 100644
--- a/src/captcha.c
+++ b/src/captcha.c
@@ -28,7 +28,6 @@
 
 void train_captcha(char *cfgfile, char *weightfile)
 {
-    data_seed = time(0);
     srand(time(0));
     float avg_loss = -1;
     char *base = basecfg(cfgfile);
@@ -106,7 +105,8 @@
     srand(2222222);
     int i = 0;
     char **names = get_labels("/data/captcha/reimgs.labels.list");
-    char input[256];
+    char buff[256];
+    char *input = buff;
     int indexes[26];
     while(1){
         if(filename){
@@ -114,7 +114,8 @@
         }else{
             //printf("Enter Image Path: ");
             //fflush(stdout);
-            fgets(input, 256, stdin);
+            input = fgets(input, 256, stdin);
+            if(!input) return;
             strtok(input, "\n");
         }
         image im = load_image_color(input, net.w, net.h);

--
Gitblit v1.10.0