simplenet.h

来自「利用遗传算法对对神经网络进行优化」· C头文件 代码 · 共 28 行

H
28
字号

#ifndef _SIMPLENET_H_
#define _SIMPLENET_H_

#include <stdlib.h>
#include <math.h>

class CSimpleNet {
	public:
		CSimpleNet();
		~CSimpleNet();

		void	AlterWeights(float);
		float	Train(float, float, float);
		float	Run(float, float, float);

		// Set/retrieve the weights
		void	SetWeights(float *);
		void	GetWeights(float *);

	protected:
		float m_fWeights[3][3];

		inline float Sigmoid(float);
};

#endif

⌨️ 快捷键说明

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