From 182515cd031f414840a83032716236b78446aada Mon Sep 17 00:00:00 2001 From: Shridhar Rasal Date: Thu, 16 Aug 2018 11:01:27 +0530 Subject: [PATCH] darknet: odla: dump data into file - add dump file into file for better debugging of input and output data. - Fix upsample dla layer name, currently it's not used however fixing to avoid confusion --- src/upsample_dla_layer.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/upsample_dla_layer.c b/src/upsample_dla_layer.c index 040ee4e3b21..e6aae143ed7 100644 --- a/src/upsample_dla_layer.c +++ b/src/upsample_dla_layer.c @@ -6,7 +6,7 @@ layer make_upsample_dla_layer(int batch, int w, int h, int c, int stride) { layer l = {0}; - l.type = UPSAMPLE; + l.type = UPSAMPLE_DLA; l.batch = batch; l.w = w; l.h = h; @@ -33,6 +33,18 @@ layer make_upsample_dla_layer(int batch, int w, int h, int c, int stride) return l; } +void dump_file(float *data, char *filename, int size) +{ + FILE *file; + int ii; + + file = fopen(filename, "w"); + for (ii = 0; ii < size; ii++) + { + fprintf(file, "%.2g\t", data[ii]); + } +} + void *cubecpy(void *dst, const void *src){ char *tmp_dst= dst; const char *tmp_src = src;