From aa5996d58e68edfbefe51061856aecd549dd09c4 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Tue, 13 Jan 2015 01:27:08 +0000
Subject: [PATCH] Faster

---
 src/parser.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/parser.c b/src/parser.c
index 37ceb08..768f48b 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -16,6 +16,7 @@
 #include "list.h"
 #include "option_list.h"
 #include "utils.h"
+#include "opencl.h"
 
 typedef struct{
     char *type;
@@ -387,8 +388,8 @@
 
 int read_option(char *s, list *options)
 {
-    int i;
-    int len = strlen(s);
+    size_t i;
+    size_t len = strlen(s);
     char *val = 0;
     for(i = 0; i < len; ++i){
         if(s[i] == '='){
@@ -416,7 +417,6 @@
         strip(line);
         switch(line[0]){
             case '[':
-                printf("%s\n", line);
                 current = malloc(sizeof(section));
                 list_insert(sections, current);
                 current->options = make_list();
@@ -441,6 +441,9 @@
 
 void print_convolutional_cfg(FILE *fp, convolutional_layer *l, network net, int count)
 {
+    #ifdef GPU
+    if(gpu_index >= 0) pull_convolutional_layer(*l);
+    #endif
     int i;
     fprintf(fp, "[convolutional]\n");
     if(count == 0) {
@@ -495,6 +498,9 @@
 
 void print_connected_cfg(FILE *fp, connected_layer *l, network net, int count)
 {
+    #ifdef GPU
+    if(gpu_index >= 0) pull_connected_layer(*l);
+    #endif
     int i;
     fprintf(fp, "[connected]\n");
     if(count == 0){

--
Gitblit v1.10.0