Simple Recurrent Neural Network Predictor
Diff: SRNN.cpp
- Revision:
- 7:92ea6cefc6a5
- Parent:
- 6:e97ccc643bf1
--- a/SRNN.cpp Thu Feb 19 13:52:45 2015 +0000 +++ b/SRNN.cpp Thu Feb 19 19:15:04 2015 +0000 @@ -168,30 +168,6 @@ int row_mid_out = dim_signal; int col_mid_out = num_mid_neuron + 1; - /* - // 行列のアロケート - // 係数行列の更新量 - float* dWin_mid = new float[row_in_mid * col_in_mid]; - float* dWmid_out = new float[row_mid_out * col_mid_out]; - - // 前回の更新量:慣性項に用いる. - float* prevdWin_mid = new float[row_in_mid * col_in_mid]; - float* prevdWmid_out = new float[row_mid_out * col_mid_out]; - - // float* norm_sample = new float[len_seqence * dim_signal]; // 正規化したサンプル信号; 実際の学習は正規化した信号を用います. - - // 出力層の信号 - float* out_signal = new float[dim_signal]; - - // 入力層->中間層の信号和 - float* in_mid_net = new float[num_mid_neuron]; - // 中間層->出力層の信号和. - float* mid_out_net = new float[dim_signal]; - - // 誤差信号 - float* sigma = new float[dim_signal]; - */ - // 係数行列の初期化 for (int i=0; i < row_in_mid; i++) for (int j=0; j < col_in_mid; j++) @@ -230,7 +206,7 @@ ); } - printf("ite:%d err:%f \r\n", iteration, squareError); + // printf("ite:%d err:%f \r\n", iteration, squareError); // 系列の末尾に到達していたら,最初からリセットする. if (seq == len_seqence && !end_flag) { @@ -424,16 +400,6 @@ } - // delete [] dWin_mid; - // delete [] dWmid_out; - // delete [] prevdWin_mid; - // delete [] prevdWmid_out; - // delete [] norm_sample; - // delete [] out_signal; - // delete [] in_mid_net; - // delete [] mid_out_net; - // delete [] sigma; - return squareError; }