/* プログラム名:deeplearn.c */ /* ディープラーニング(学習) */ # include<stdio.h> # include<stdlib.h> # include<math.h> # include<time.h> /* パラメータを設定する(今書いてある値は例であるため、好きに設定してよい) */ # define NUM_LEARN 10000 /* 学習回数 */ # define NUM_SAMPLE 6 /* 訓練データ数(今回は6パターン用意する)*/ # define NUM_INPUT 3 /* 入力層の数(論理回路の入力)*/ # define NUM_HIDDEN_ONE 4 /* 中間層1の数(自由)*/ # define NUM_HIDDEN_TWO 2 /* 中間層2の数(自由)*/ # define NUM_OUTPUT 1 /* 出力層
