#include <bpn1.h>
Public 型 | |
typedef double | value_type |
typedef of the value type | |
typedef boost::array< value_type, INPUT > | input_array |
typedef of the input array type that uses template parameter. | |
typedef boost::array< value_type, OUTPUT > | output_array |
typedef of the output array type that uses template parameter. | |
Public メソッド | |
BPNetwork1 () | |
default constructor | |
BPNetwork1 (const value_type &eta, const value_type &alpha) | |
create with learning parameter | |
template<typename RNG> | |
BPNetwork1 (const value_type &eta, const value_type &alpha, RNG &rng) | |
create with random number generator | |
void | init () |
init member variables | |
template<typename RNG> | |
void | randomize (RNG &rng) |
create unit connection randomly | |
void | propagate (const input_array &input, output_array &output) const |
simulate network. | |
value_type | train (const input_array &input, const output_array &teacher) |
update unit connection weights using teacher signal | |
bool | read (std::istream &is) |
read network structure from input stream. | |
std::ostream & | print (std::ostream &os) const |
put network structure to stream by "one" line |
This class can take only one hidden layer, but unit number and activation function can be specified by template parameters.
rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::BPNetwork1 | ( | ) | [inline] |
default constructor
default training parameter is set.
rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::BPNetwork1 | ( | const value_type & | eta, | |
const value_type & | alpha | |||
) | [inline] |
create with learning parameter
eta | training parameter | |
alpha | training parameter |
rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::BPNetwork1 | ( | const value_type & | eta, | |
const value_type & | alpha, | |||
RNG & | rng | |||
) | [inline] |
create with random number generator
eta | training parameter | |
alpha | training parameter | |
rng | referenct to the random number generator object |
void rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::randomize | ( | RNG & | rng | ) | [inline] |
create unit connection randomly
rng | referenct to the random number generator object |
void rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::propagate | ( | const input_array & | input, | |
output_array & | output | |||
) | const [inline] |
simulate network.
input | input data | |
output | reference to the data holder variable |
value_type rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::train | ( | const input_array & | input, | |
const output_array & | teacher | |||
) | [inline] |
update unit connection weights using teacher signal
input | input data | |
teacher | teaching signal data |
bool rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::read | ( | std::istream & | is | ) | [inline] |
read network structure from input stream.
is | reference to the input stream |
std::ostream& rcsc::BPNetwork1< INPUT, HIDDEN, OUTPUT, FuncH, FuncO >::print | ( | std::ostream & | os | ) | const [inline] |
put network structure to stream by "one" line
os | reference to the output stream |