-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from CrystSw/dev
Merge dev-branch.
- Loading branch information
Showing
11 changed files
with
567 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef __SNN_MNIST_H_INCLUDED__ | ||
#define __SNN_MNIST_H_INCLUDED__ | ||
|
||
#include "nnet_types.h" | ||
|
||
extern FVALUE read_mnistimg(char *filename); | ||
extern LABELOHV read_mnistlbl_ohv(char *filename); | ||
extern LABEL read_mnistlbl(char *filename); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
#ifndef __SIMPLE_NNET_H__ | ||
#define __SIMPLE_NNET_H__ | ||
#ifndef __SNN_NNET_H_INCLUDED__ | ||
#define __SNN_NNET_H_INCLUDED__ | ||
|
||
#include "snnet-types.h" | ||
#include "nnet_types.h" | ||
|
||
extern FVALUE read_mnistimg(char *filename); | ||
extern LABEL read_mnistlbl(char *filename); | ||
extern LABELOHV read_mnistlbl_ohv(char *filename); | ||
extern double softmax(const double *output, const int id, const int size); | ||
extern double cross_entropy(const double *rpp, const double *wpp, const int size); | ||
extern void nncout_train(const TRAINDATA td, double **weight, const double *bias, const int id, double *catout); | ||
extern void nncout_test(const TESTDATA td, double **weight, const double *bias, const int id, double *catout); | ||
extern void nncpp(const double *catout, const int size, double *catpp); | ||
extern double xentrloss(const TRAINDATA td, double **weight, const double *bias); | ||
extern int getmax(const double *p, int size); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef __SNN_UTIL_H_INCLUDED__ | ||
#define __SNN_UTIL_H_INCLUDED__ | ||
|
||
extern double *malloc_d1(const int size1); | ||
extern double *calloc_d1(const int size1); | ||
extern double **malloc_d2(const int size1, const int size2); | ||
extern double **calloc_d2(const int size1, const int size2); | ||
extern void free_d1(double *array); | ||
extern void free_d2(double **array, const int size1); | ||
extern int getmax(const double *array, int size1); | ||
extern void writefile_d1(const char *filename, double *array_d1, const int size1); | ||
extern void readfile_d1(const char *filename, double *array_d1, const int size1); | ||
extern void writefile_d2(const char *filename, double **array_d2, const int size1, const int size2); | ||
extern void readfile_d2(const char *filename, double **array_d2, const int size1, const int size2); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.