summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-06-10 14:35:42 -0400
committerCalvin <calvin@EESI>2013-06-10 14:35:42 -0400
commita07e692d4ea69466a26c5cbdb3176046b71d761e (patch)
tree34fb0a5fa99f9ecaec9904a91d6c84e19409eaa8 /src
parent884f6d5a31d66ca20f6f88200c2dae031e470029 (diff)
finish gzip decoding, YOU MUST retrain your api
Diffstat (limited to 'src')
-rw-r--r--src/c/quikr_functions.c1
-rw-r--r--src/c/quikr_train.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/c/quikr_functions.c b/src/c/quikr_functions.c
index 42c9f7d..7bdbb9e 100644
--- a/src/c/quikr_functions.c
+++ b/src/c/quikr_functions.c
@@ -106,7 +106,6 @@ double *load_sensing_matrix(char *filename, int height, int width) {
for (y = 1; y < width; y++) {
char buffer[14];
gzgets(sensing_matrix_fh, buffer, 14);
- printf("%s\n", buffer);
sensing_matrix[width*x + y] = atof(buffer);
}
}
diff --git a/src/c/quikr_train.c b/src/c/quikr_train.c
index 767ac7d..c728a2c 100644
--- a/src/c/quikr_train.c
+++ b/src/c/quikr_train.c
@@ -168,10 +168,10 @@ int main(int argc, char **argv) {
trained_matrix[y] = trained_matrix[y] / row_sum;
}
- for( y = 0; y < width; y++) {
+ for( y = 0; y < (width - 1); y++) {
gzprintf(output, "%.10f\t", trained_matrix[y]);
}
- gzprintf(output, "\n");
+ gzprintf(output, "%.10f\n", trained_matrix[width]);
}
free(trained_matrix);