Exemplo n.º 1
0
        /// <summary>
        /// 既定の初期化
        /// </summary>
#else
		/// <summary>
		/// Default constructor
		/// </summary>
#endif
		public CvANN_MLP_TrainParams()
		{
            IntPtr p = MLInvoke.CvANN_MLP_TrainParams_construct_default();
            _data = (WCvANN_MLP_TrainParams)Marshal.PtrToStructure(p, typeof(WCvANN_MLP_TrainParams));
            MLInvoke.CvANN_MLP_TrainParams_destruct(p);
		}
Exemplo n.º 2
0
        /// <summary>
        /// 学習データを与えて初期化
        /// </summary>
		/// <param name="term_crit">学習アルゴリズムの終了条件.アルゴリズムにより何度繰り返されるか (逐次型の誤差逆伝播アルゴリズムでは,この数は学習データセットのサイズと掛け合わされる)と,1ターンで重みをどの程度変更するかを指定する.</param>
		/// <param name="train_method">用いる学習アルゴリズム</param>
		/// <param name="param1"></param>
		/// <param name="param2"></param>
#else
		/// <summary>
        /// Training constructor
        /// </summary>
		/// <param name="term_crit">The termination criteria for the training algorithm. It identifies how many iterations is done by the algorithm (for sequential backpropagation algorithm the number is multiplied by the size of the training set) and how much the weights could change between the iterations to make the algorithm continue. </param>
		/// <param name="train_method">The training algorithm to use</param>
		/// <param name="param1"></param>
		/// <param name="param2"></param>
#endif
		public CvANN_MLP_TrainParams(CvTermCriteria term_crit, MLPTrainingMethod train_method, double param1, double param2)
		{
            IntPtr p = MLInvoke.CvANN_MLP_TrainParams_construct(term_crit, (int)train_method, param1, param2);
            _data = (WCvANN_MLP_TrainParams)Marshal.PtrToStructure(p, typeof(WCvANN_MLP_TrainParams));
            MLInvoke.CvANN_MLP_TrainParams_destruct(p);
		}
Exemplo n.º 3
0
 public static extern int CvANN_MLP_train(IntPtr obj, IntPtr _inputs, IntPtr _outputs, IntPtr _sample_weights,
                 IntPtr _sample_idx, WCvANN_MLP_TrainParams _params, int flags);