RapidLib
v0.1.2
A simple library for interactive machine learning
nnEmbindings.h
Go to the documentation of this file.
1
/*
2
bindings for use with emscripten. -22 Aug 2016, mz
3
*/
4
5
#ifndef nnEmbindings_h
6
#define nnEmbindings_h
7
8
#include <vector>
9
#include <emscripten.h>
10
#include <bind.h>
11
12
using namespace
emscripten
;
13
14
EMSCRIPTEN_BINDINGS
(nn_module) {
15
class_<neuralNetwork>(
"NeuralNetwork"
)
16
.constructor<
int
, std::vector<int>,
int
,
int
>()
17
.constructor<int, std::vector<int>, int, int, std::vector<double>, std::vector<double>, std::vector<double>, std::vector<double>, double,
double
>()
18
.
function
(
"process"
, &
neuralNetwork::process
)
19
.function(
"train"
, &
neuralNetwork::train
)
20
;
21
22
};
23
#endif
emscripten
neuralNetwork::train
void train(const std::vector< trainingExample > &trainingSet)
Definition:
neuralNetwork.cpp:315
EMSCRIPTEN_BINDINGS
EMSCRIPTEN_BINDINGS(nn_module)
Definition:
nnEmbindings.h:14
neuralNetwork::process
double process(const std::vector< double > &inputVector)
Definition:
neuralNetwork.cpp:273
nnEmbindings.h
Generated by
1.8.13