bktest.cpp

来自「類神經網路的BK演算法」· C++ 代码 · 共 29 行

CPP
29
字号
#include <stdio.h>

#include <stdlib.h>

#include "bkneuro.h"



//void main()

main()

{

	int i,key;

	char filename[128];

	float err;

	cout<<"Input filename of testing data : ";

	cin>>filename;

	ifstream in1(filename);

	ifstream in2("neurowgt.dat");

	ofstream out("testrlt.dat");

	if((!in1)||(!in2))

   {

   	cout<<"Cannot open file! Any key to terminate...";

   	getchar();;exit(1);

   }

	BKNeuroNet nn;

	nn.Initialize(in2);

	nn.ApplyToTestingData(in1,out);



	cout<<endl<<"The output file is testrlt.dat"<<endl;

	cout<<"enter any key to terminate...";

   getchar();

}

⌨️ 快捷键说明

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