From 2ea63c0e99a5358eaf38785ea83b9c5923fcc9cd Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 13 Mar 2014 04:57:34 +0000
Subject: [PATCH] Better VOC handling and resizing
---
src/convolutional_layer.h | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/src/convolutional_layer.h b/src/convolutional_layer.h
index e2e6cdc..4e69dcf 100644
--- a/src/convolutional_layer.h
+++ b/src/convolutional_layer.h
@@ -5,33 +5,34 @@
#include "activations.h"
typedef struct {
+ int batch;
int h,w,c;
- int out_h, out_w, out_c;
int n;
int size;
int stride;
- double *filters;
- double *filter_updates;
- double *filter_momentum;
+ float *filters;
+ float *filter_updates;
+ float *filter_momentum;
- double *biases;
- double *bias_updates;
- double *bias_momentum;
+ float *biases;
+ float *bias_updates;
+ float *bias_momentum;
- double *col_image;
- double *delta;
- double *output;
+ float *col_image;
+ float *delta;
+ float *output;
ACTIVATION activation;
} convolutional_layer;
-convolutional_layer *make_convolutional_layer(int h, int w, int c, int n, int size, int stride, ACTIVATION activation);
-void forward_convolutional_layer(const convolutional_layer layer, double *in);
+convolutional_layer *make_convolutional_layer(int batch, int h, int w, int c, int n, int size, int stride, ACTIVATION activation);
+void resize_convolutional_layer(convolutional_layer *layer, int h, int w, int c);
+void forward_convolutional_layer(const convolutional_layer layer, float *in);
void learn_convolutional_layer(convolutional_layer layer);
-void update_convolutional_layer(convolutional_layer layer, double step, double momentum, double decay);
+void update_convolutional_layer(convolutional_layer layer, float step, float momentum, float decay);
void visualize_convolutional_layer(convolutional_layer layer, char *window);
-//void backward_convolutional_layer(convolutional_layer layer, double *input, double *delta);
+void backward_convolutional_layer(convolutional_layer layer, float *delta);
//void backpropagate_convolutional_layer_convolve(image input, convolutional_layer layer);
//void visualize_convolutional_filters(convolutional_layer layer, char *window);
--
Gitblit v1.10.0