⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bp.h

📁 用人工神经网络实现异或的功能。用反向传播算法(BP)来实现神经网络
💻 H
字号:
// Bp.h: interface for the Bp class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BP_H__FFFFA0FB_8EC9_407C_83B1_C618CAC8A95E__INCLUDED_)
#define AFX_BP_H__FFFFA0FB_8EC9_407C_83B1_C618CAC8A95E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Sample.h"

#define N 4
#define H 10
#define M 2
#define MAX_SAMPLE  20
#define MAX_LOOP   3000
#define EPSILON  0.001
#define TEST_LOOP  20

class Bp  
{
public:

	FILE *f;
	Bp();
	virtual ~Bp();
	void InitializeRandom();
	int RandomInt(int low,int high);
	double RandomReal(double low,double high);
	void InputMultV(double input[],int n,double (*Vmatrix)[H],int h,double output[]);
	void HMultoutput(double hidden[],int h,double (*Wmatrix)[M],int m,double output[]);
	double  NetFunction(double net);
	void netoutput(Sample *question[],int questionnum,double(*w)[M],double(*v)[H],int h);
	void bpnet(double alph,Sample *samples[],int samplenum,double (*w)[M],double(*v)[H],int h);
	void  application();

	

};

#endif // !defined(AFX_BP_H__FFFFA0FB_8EC9_407C_83B1_C618CAC8A95E__INCLUDED_)

⌨️ 快捷键说明

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