forked from dhanesh123us/NNREGCG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnnopt.C
39 lines (32 loc) · 763 Bytes
/
nnopt.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "ffcgnn.h"
int main(int argc,char **argv)
{
int i,num,niter=1,noisecnt=0;
char opt,fname1[10],fname[10];
int n1,n2;
float det;
float ge1=0,eps,emax;
int nmax=5000;
// network *share=new network();
network *share;
cout<<"Input the file name"<<endl;
cin>>fname;
cout<<"Input the no. of input, output and determinant"<<endl;
cin>>n1;
cin>>n2;
cin>>det;
share=new network(n1,n2,det,fname);
share->setparms_bp();
share->fscale();
share->train();
share->store();
cout<<"Wanna predict? <type 'y' for yes>"<<endl;
cin>>opt;
while (opt=='y')
{
share->predict();
cout<<"Wanna predict? <type 'y' for yes>"<<endl;
cin>>opt;
}
return 0;
}