亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? test1.cpp

?? neural network 一個演示原理的代碼
?? CPP
字號:
#include "stdafx.h"
#include "aine.h"
#include "ne-neuron.h"
#include "ne-data.h"

using namespace aine;

extern ofstream tron;

double Inverse( const double v )
{
	return v > 1.0 ? 0.0 : 1.0;
}

int EORTest( const string )
{
	cout << "create a sample meural Process of EOR" << endl;
	tron << "create a sample meural Process of EOR" << endl;

	/*

	*/
	Neuron input[2] , _and , _or , _not , trigger , ans;

	//	Connect to AND
	input[0].ConnectWith( &_and );
	input[1].ConnectWith( &_and );

	//	Connect to OR
	input[0].ConnectWith( &_or );
	input[1].ConnectWith( &_or );

	//	Initialize the not trigger
	trigger.ConnectWith( &_not );

	//	Connect the OR to the NOT and set threshold.
	_or.ConnectWith( &_not );
	_or.SetThreshold( .5 );
	
	//	Connect the MOT to the ans
	_not.ConnectWith( &ans );
	_not.axon[0]->SetCallBack( Inverse );

	//	Connect the and with the OR and set threshold.
	_and.SetThreshold( 1.0 );
	_and.ConnectWith( &_or );

	//	Connect the ans to te OR
	ans.ConnectWith( &_or );

	double in[4][2] =
	{	{	0.0 , 0.0	} ,
		{	1.0 , 0.0	} ,
		{	0.0 , 1.0	} ,
		{	1.0 , 1.0	} 
	};

	for( int i = 0 ; i < 4 ; i++ )
	{
		input[0].SetInputValue( in[i][0] );
		input[1].SetInputValue( in[i][1] );

		cout << i << ") " << in[i][0]  << " EOR " << in[i][1] << " : " ;
		tron << i << ") " << in[i][0]  << " EOR " << in[i][1] << " : " ;

		input[0].Depolarization();
		input[1].Depolarization();
		_or.Depolarization();
		trigger.SetInputValue( 1.0 );
		trigger.Depolarization();
		_not.Depolarization();
		cout << "\t A AND B = " << (int)(_and.ActionPotential() ? 1 : 0);
		cout << "\t A NOR B = " << (int)(ans.ActionPotential() ? 1 : 0);
		tron << " A AND B = " << (int)(_and.ActionPotential() ? 1 : 0);
		tron << " A NOR B = " << (int)(ans.ActionPotential() ? 1 : 0);
		_or.Clean();
		_not.Clean();

		cout << "\t: " << (int)(_and.ActionPotential() ? 1 : 0) << " OR " << (int)(ans.ActionPotential() ? 1 : 0);
		tron << "\t: " << (int)(_and.ActionPotential() ? 1 : 0) << " OR " << (int)(ans.ActionPotential() ? 1 : 0);

		ans.Depolarization();
		_and.Depolarization();
		cout << " -NEOR-> " << (int)(_or.ActionPotential() ? 1 : 0);
		tron << " -NEOR-> " << (int)(_or.ActionPotential() ? 1 : 0);

		_or.Depolarization();
		trigger.SetInputValue( 1.0 );
		trigger.Depolarization();
		_not.Depolarization();

		cout << " =EOR=> " << (int)(ans.ActionPotential() ? 1 : 0) << endl;
		tron << " =EOR=> " << (int)(ans.ActionPotential() ? 1 : 0) << endl;

		ans.Clean();
		_and.Clean();
		_or.Clean();
		_not.Clean();
	}

	return 0;
}

int ReduceNeuron( const string )
{
	cout << "create a sample meural Process of boolean operators with less neurons" << endl;
	tron << "create a sample meural Process of boolean operators with less neurons" << endl;

	Neuron	n1 , n2;
	double in[4][2] =
	{	{	0.0 , 0.0	} ,
		{	1.0 , 0.0	} ,
		{	0.0 , 1.0	} ,
		{	1.0 , 1.0	} 
	};
	n1.ConnectWith( &n2 );
	n2.ConnectWith( &n2 );
	cout << "Tracing OR:" << endl;
	tron << "Tracing OR:" << endl;
	for( int i = 0 ; i < 40 ; i++ )
	{
		const int at = i >= 4 ? (int)Random( 0 , 4 , true ) : i;
		n1.SetInputValue( in[at][0] );
		n2.SetInputValue( in[at][1] + n2.GetThreshold() );

		n1.Depolarization();
		n2.Depolarization();

		cout << i << ") " << in[at][0]  << " OR " << in[at][1] << " ---> " << (int)(n2.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " OR " << in[at][1] << " ---> " << (int)(n2.ActionPotential() ? 1 : 0);
		if( n2.ActionPotential() )
			if( !(in[at][0] || in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;
	}
	cout << endl;
	tron << endl;

	return 0;
}

int BoolTest( const string path )
{
	cout << "create a sample meural Process of boolean operators" << endl;
	tron << "create a sample meural Process of boolean operators" << endl;

	Neuron	output( 0.0 , 0.5 ) , input[2] , NotOp , InvTrigger , ans;

	input[0].ConnectWith( &output );
	input[1].ConnectWith( &output );
	
	output.ConnectWith( &NotOp );
	NotOp.ConnectWith( &ans );
	InvTrigger.ConnectWith( &NotOp );
	InvTrigger.SetInputValue( 1.0 );

	NotOp.axon[0]->SetCallBack( Inverse );

	double in[4][2] =
	{	{	0.0 , 0.0	} ,
		{	1.0 , 0.0	} ,
		{	0.0 , 1.0	} ,
		{	1.0 , 1.0	} 
	};

	output.SetThreshold( .5 );

	for( int i = 0 ; i < 4 ; i++ )
	{
		const int at = i;
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		cout << i << ") " << in[at][0]  << " OR " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " OR " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( !(in[at][0] || in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;

		output.Clean();
	}
	for( int i = 0 ; i < 40 ; i++ )
	{
		const int at = (int)Random( 0 , 4 , true );
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		cout << i << ") " << in[at][0]  << " OR " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " OR " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( !(in[at][0] || in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;

		output.Clean();
	}
	cout << endl;
	tron << endl;
	for( int i = 0 ; i < 4 ; i++ )
	{
		const int at = i;
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		output.Depolarization();
		InvTrigger.Depolarization();
		NotOp.Depolarization();
		cout << i << ") " << in[at][0]  << " NOR " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " NOR " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( in[at][0] || in[at][1] )
				tron << " **** ERROR *** ";
		tron << endl;

		ans.Clean();
		InvTrigger.SetInputValue( 1.0 );
	}
	for( int i = 0 ; i < 40 ; i++ )
	{
		const int at = (int)Random( 0 , 4 , true );
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		output.Depolarization();
		InvTrigger.Depolarization();
		NotOp.Depolarization();
		cout << i << ") " << in[at][0]  << " NOR " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " NOR " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( in[at][0] || in[at][1] )
				tron << " **** ERROR *** ";
		tron << endl;

		ans.Clean();
		output.Clean();
		InvTrigger.SetInputValue( 1.0 );
	}
	cout << endl;
	tron << endl;

	output.SetThreshold( 1.5 );

	for( int i = 0 ; i < 4 ; i++ )
	{
		const int at = i;
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		cout << i << ") " << in[at][0]  << " AND " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " AND " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( !(in[at][0] && in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;

		output.Clean();
	}
	for( int i = 0 ; i < 40 ; i++ )
	{
		const int at = (int)Random( 0 , 4 , true );
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		cout << i << ") " << in[at][0]  << " AND " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " AND " << in[at][1] << " ---> " << (int)(output.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( !(in[at][0] && in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;

		output.Clean();
	}
	cout << endl;
	tron << endl;

	for( int i = 0 ; i < 4 ; i++ )
	{
		const int at = i;
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		InvTrigger.Depolarization();
		output.Depolarization();
		NotOp.Depolarization();

		cout << i << ") " << in[at][0]  << " NAND " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " NAND " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( (in[at][0] && in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;

		ans.Clean();
		output.Clean();
		InvTrigger.SetInputValue( 1.0 );
	}
	for( int i = 0 ; i < 40 ; i++ )
	{
		const int at = (int)Random( 0 , 4 , true );
		input[0].SetInputValue( in[at][0] );
		input[1].SetInputValue( in[at][1] );

		input[0].Depolarization();
		input[1].Depolarization();

		InvTrigger.Depolarization();
		output.Depolarization();
		NotOp.Depolarization();

		cout << i << ") " << in[at][0]  << " NAND " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0) << endl;
		tron << i << ") " << in[at][0]  << " NAND " << in[at][1] << " ---> " << (int)(ans.ActionPotential() ? 1 : 0);
		if( output.ActionPotential() )
			if( (in[at][0] && in[at][1]) )
				tron << " **** ERROR *** ";
		tron << endl;

		ans.Clean();
		InvTrigger.SetInputValue( 1.0 );
	}
	tron << endl;
	cout << endl;

	return 0;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久中文字幕综合网| 看国产成人h片视频| 亚洲bt欧美bt精品| 久久精品国产99久久6| 国产91在线|亚洲| 欧美中文字幕亚洲一区二区va在线| 欧美日韩mp4| 久久看人人爽人人| 一区二区三区在线免费播放 | 波多野结衣亚洲| 欧洲一区在线观看| 欧美v日韩v国产v| 日韩一区有码在线| 久久成人免费电影| 色婷婷av一区二区三区软件| 精品国产青草久久久久福利| 亚洲三级免费电影| 美脚の诱脚舐め脚责91 | 亚洲老妇xxxxxx| 国内久久婷婷综合| 欧洲亚洲精品在线| 欧美国产1区2区| 日韩二区在线观看| 9久草视频在线视频精品| 日韩久久免费av| 亚洲精品国产第一综合99久久| 狠狠色丁香久久婷婷综合_中| 欧美性极品少妇| 国产女人18水真多18精品一级做 | 日韩三级中文字幕| 亚洲免费观看高清完整版在线观看 | 国产一区二区在线观看视频| 91免费观看视频在线| 久久午夜电影网| 亚洲风情在线资源站| 91一区在线观看| 2023国产精华国产精品| 亚洲成av人综合在线观看| 成人激情av网| 久久久三级国产网站| 青青草原综合久久大伊人精品 | 亚洲午夜免费电影| 成人h版在线观看| 精品久久国产字幕高潮| 亚洲成a天堂v人片| 91浏览器打开| 国产精品国产三级国产aⅴ中文| 精彩视频一区二区| 欧美一区二区三区四区视频| 亚洲一区二区成人在线观看| eeuss影院一区二区三区| 26uuu另类欧美亚洲曰本| 爽好多水快深点欧美视频| 91小宝寻花一区二区三区| 久久视频一区二区| 麻豆精品新av中文字幕| 91精品国产乱码| 天堂蜜桃一区二区三区| 欧美午夜视频网站| 一区二区三区在线观看视频| 99久久777色| 日韩美女视频一区二区 | 成人免费在线视频| 成人免费毛片片v| 中文子幕无线码一区tr| 国产suv精品一区二区6| 久久夜色精品国产噜噜av| 久久精品国产99| 欧美tickling网站挠脚心| 日本aⅴ免费视频一区二区三区 | 激情综合色综合久久| 欧美tk丨vk视频| 国产一区二区按摩在线观看| 欧美草草影院在线视频| 国内精品免费**视频| 久久久久成人黄色影片| 风间由美性色一区二区三区| 亚洲国产精品成人综合| 成人白浆超碰人人人人| 国产精品国产三级国产专播品爱网| 成人激情开心网| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| aaa欧美色吧激情视频| 一区二区三区在线影院| 欧美日韩在线播放三区| 日本特黄久久久高潮| xf在线a精品一区二区视频网站| 国产一区二三区| 欧美国产精品一区二区三区| 91视视频在线观看入口直接观看www| 亚洲免费色视频| 欧美精品乱人伦久久久久久| 琪琪久久久久日韩精品| 精品久久久久久久久久久久包黑料| 国产乱人伦偷精品视频不卡| 中文字幕电影一区| 色婷婷综合久色| 亚洲国产日韩av| 日韩欧美一区中文| 国产激情视频一区二区三区欧美 | 在线免费不卡电影| 日本网站在线观看一区二区三区| 在线观看91av| 国产夫妻精品视频| 樱花草国产18久久久久| 欧美久久一区二区| 国产一本一道久久香蕉| 综合在线观看色| 91精品在线麻豆| 国产a视频精品免费观看| 亚洲欧美一区二区不卡| 日韩视频不卡中文| 99re这里只有精品视频首页| 天堂va蜜桃一区二区三区| 国产日产亚洲精品系列| 91极品视觉盛宴| 蜜桃av一区二区在线观看 | 91欧美激情一区二区三区成人| 日韩综合在线视频| 久久精品欧美一区二区三区不卡| 色先锋资源久久综合| 久久er精品视频| 中文字幕亚洲视频| 制服.丝袜.亚洲.中文.综合| 成人午夜免费视频| 日本午夜一本久久久综合| 亚洲欧洲成人精品av97| 日韩精品资源二区在线| 91在线视频在线| 老汉av免费一区二区三区 | 在线不卡欧美精品一区二区三区| 国产精品99久久久| 午夜精品一区二区三区电影天堂 | 波多野结衣91| 美女www一区二区| 一区二区三区毛片| 国产农村妇女毛片精品久久麻豆| 91精品国产麻豆国产自产在线 | 亚洲午夜精品在线| 欧美高清一级片在线观看| 欧美一卡在线观看| 色综合天天狠狠| 国产激情视频一区二区三区欧美| 午夜精品视频一区| 成人欧美一区二区三区视频网页| 久久综合999| 日韩欧美激情在线| 在线观看亚洲精品| 成人爱爱电影网址| 国产精品1区2区| 美脚の诱脚舐め脚责91| 五月激情综合婷婷| 亚洲欧美日韩国产一区二区三区| 久久精品欧美日韩精品| 欧美成人欧美edvon| 欧美精品日韩综合在线| 欧美吞精做爰啪啪高潮| 99精品视频在线观看免费| 国产成人亚洲综合a∨婷婷 | 国产亚洲女人久久久久毛片| 欧美一区二区成人6969| 欧美人妇做爰xxxⅹ性高电影| 91麻豆免费观看| www.亚洲在线| 国产91在线|亚洲| 国产乱国产乱300精品| 麻豆成人久久精品二区三区小说| 日韩精品电影在线观看| 亚洲国产色一区| 亚洲国产一区二区三区青草影视| 亚洲色图欧美激情| 专区另类欧美日韩| 综合电影一区二区三区| 国产精品乱码人人做人人爱| 国产网站一区二区| 国产欧美一区二区三区在线看蜜臀 | 亚洲蜜臀av乱码久久精品蜜桃| 国产精品区一区二区三区| 久久综合久久久久88| 亚洲精品一线二线三线| www成人在线观看| 久久综合99re88久久爱| 久久久久久亚洲综合| 国产午夜三级一区二区三| 久久久精品免费免费| 国产天堂亚洲国产碰碰| 中文字幕精品综合| 最新中文字幕一区二区三区| ...av二区三区久久精品| 亚洲女人小视频在线观看| 亚洲激情av在线| 亚洲综合色区另类av| 亚洲成人www| 日本特黄久久久高潮| 久久99精品久久久久久久久久久久 | 69堂成人精品免费视频| 7878成人国产在线观看| 日韩片之四级片| 国产视频视频一区| 国产精品成人免费|