Skip to content

Commit

Permalink
dA.h
Browse files Browse the repository at this point in the history
Yusuke Sugomori committed Feb 12, 2013
1 parent 41c7a0c commit 4644aa4
Showing 2 changed files with 18 additions and 20 deletions.
21 changes: 1 addition & 20 deletions cpp/dA.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <iostream>
#include <math.h>
#include "dA.h"
using namespace std;


@@ -26,26 +27,6 @@ double sigmoid(double x) {
}



class dA {

public:
int N;
int n_visible;
int n_hidden;
double **W;
double *hbias;
double *vbias;
dA(int, int, int , double**, double*, double*);
~dA();
void get_corrupted_input(int*, int*, double);
void get_hidden_values(int*, double*);
void get_reconstructed_input(double*, double*);
void train(int*, double, double);
void reconstruct(int*, double*);
};


dA::dA(int size, int n_v, int n_h, double **w, double *hb, double *vb) {
N = size;
n_visible = n_v;
17 changes: 17 additions & 0 deletions cpp/dA.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class dA {

public:
int N;
int n_visible;
int n_hidden;
double **W;
double *hbias;
double *vbias;
dA(int, int, int , double**, double*, double*);
~dA();
void get_corrupted_input(int*, int*, double);
void get_hidden_values(int*, double*);
void get_reconstructed_input(double*, double*);
void train(int*, double, double);
void reconstruct(int*, double*);
};

0 comments on commit 4644aa4

Please sign in to comment.