14#ifndef SIMPLEPERCEPTRON
15#define SIMPLEPERCEPTRON
29 #define arcs_assert(a) (assert(a))
32 #define EventLogVar(a)
38 template <
unsigned int N,
unsigned int M>
70 for(
unsigned int i = 0; i < Epoch; ++i){
71 printf(
"Epoch: %u, ", i);
73 for(
unsigned int j = 0; j < M; ++j){
74 Error = WeightCalculation(x[j], t.
GetElement(1,j+1));
75 printf(
"%f, ", Error);
100 double K = (t - z)*eta;
static double Step(double u)
ステップ活性化関数
Definition ActivationFunctions.hh:50
行列/ベクトル計算クラス(テンプレート版)
Definition Matrix.hh:44
constexpr TT GetElement(size_t n, size_t m) const
指定した要素番号の値を返す関数
Definition Matrix.hh:489
単純パーセプトロンクラス
Definition SimplePerceptron.hh:39
void Train(const std::array< Matrix< 1, N+1 >, M > &x, const Matrix< 1, M > &t, double Gain, unsigned int Epoch)
学習をする関数
Definition SimplePerceptron.hh:66
double ForwardCalculation(const Matrix< 1, N+1 > &x)
前進計算
Definition SimplePerceptron.hh:83
SimplePerceptron(SimplePerceptron &&r)
ムーブコンストラクタ
Definition SimplePerceptron.hh:50
~SimplePerceptron()
デストラクタ
Definition SimplePerceptron.hh:57
SimplePerceptron()
コンストラクタ
Definition SimplePerceptron.hh:42