multilayerperceptrondlg.h

来自「多层神经网络范例 http://www.codeproject.com/cpp」· C头文件 代码 · 共 67 行

H
67
字号
// MultiLayerPerceptronDlg.h : header file
//

#pragma once
#include "Perceptron.h"
#include "ErrorDlg.h"
#include "afxwin.h"

// CMultiLayerPerceptronDlg dialog
class CMultiLayerPerceptronDlg : public CDialog
{
// Construction
public:
	CMultiLayerPerceptronDlg(CWnd* pParent = NULL);	// standard constructor
	~CMultiLayerPerceptronDlg()// standard destructor
	{
		delete m_ErrorDlg;
	};	

// Dialog Data
	enum { IDD = IDD_MULTILAYERPERCEPTRON_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

public:
	Perceptron* perceptron;

	void initPerceptron();
	void learnPoints();
	void setSamples();
	void UpdateDisplay();
// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedInit();
	// number of neuron in hidden layer
	UINT m_hidSize[3];
	static const n_in  = 2;//10*10;
	static const n_out = 1;//32;
	double m_dLearningRate;
	double m_dMomentum;
	CErrorDlg *m_ErrorDlg;
	CArray<CPoint> m_RedPts,m_BluePts;//Sample points from user
	float m_fRedRatio[600][800];
	afx_msg void OnBnClickedLearn();
	long m_nIter;
	CComboBox m_cmbColor;
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedClear();
	double m_dTargetError;
	BOOL m_bWritetoFile;
	afx_msg void OnBnClickedShowError();
	afx_msg void OnBnClickedLoadWeights();
	afx_msg void SaveWeights();
	CString m_strErrorFile;
	afx_msg void OnBnClickedWritetofile();
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?