-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9625a36
commit 3bbc809
Showing
22 changed files
with
346 additions
and
60 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+1.32 KB
(68000%)
Reform_TrainingData/x64/Release/Reform_T.EF1B4ECE.tlog/link.command.1.tlog
Binary file not shown.
Binary file modified
BIN
+3.23 KB
(170000%)
Reform_TrainingData/x64/Release/Reform_T.EF1B4ECE.tlog/link.read.1.tlog
Binary file not shown.
Binary file modified
BIN
+710 Bytes
(36000%)
Reform_TrainingData/x64/Release/Reform_T.EF1B4ECE.tlog/link.write.1.tlog
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
reform.cpp | ||
reform.cpp(54): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据 | ||
MSVCRT.lib(exe_main.obj) : error LNK2001: 无法解析的外部符号 main | ||
E:\我的 东东\EasyX学习\深度学习\Nerve_Net\x64\Release\Reform_TrainingData.exe : fatal error LNK1120: 1 个无法解析的外部命令 | ||
正在生成代码 | ||
4 of 236 functions ( 1.7%) were compiled, the rest were copied from previous compilation. | ||
0 functions were new in current compilation | ||
4 functions had inline decision re-evaluated but remain unchanged | ||
已完成代码的生成 | ||
Reform_TrainingData.vcxproj -> E:\我的 东东\EasyX学习\深度学习\Nerve_Net\x64\Release\Reform_TrainingData.exe | ||
Reform_TrainingData.vcxproj -> E:\我的 东东\EasyX学习\深度学习\Nerve_Net\x64\Release\Reform_TrainingData.pdb (Full PDB) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#include<iostream> | ||
#include<fstream> | ||
#include<vector> | ||
#include"..//Nerve//Nerve.cpp" | ||
#include<windows.h> | ||
using namespace std; | ||
/* | ||
单体数据结构 | ||
*/ | ||
#define N 28 | ||
struct Train | ||
{ | ||
int train_times; //训练次数 | ||
|
||
int exam_times; //测试次数 | ||
|
||
int exam_A; //正确样本数 | ||
int exam_W; //错误样本数 | ||
|
||
Nerve_net &nerve; //训练神经网络 | ||
char Nerve_ID[16]; //神经网络ID | ||
struct Data | ||
{ | ||
char point[N * N]; | ||
char ans; | ||
}; | ||
|
||
public: | ||
Train(Nerve_net &i):nerve(i) | ||
{ | ||
} | ||
void train(char *file) | ||
{ | ||
ifstream in(file,ios::binary); | ||
Data data; | ||
vector<double> vec(N*N,0.0); | ||
vector<double> outp(10,0.0); | ||
while(1) | ||
{ | ||
in.read((char*)&data,sizeof(data)); | ||
if(in.gcount()!=0) | ||
{ | ||
for(int i=0;i<N*N;i++) | ||
vec[i]=data.point[i]; | ||
outp[data.ans]=1.0; | ||
nerve.Input(vec); | ||
nerve.Set_Desired_output(outp); | ||
nerve.Figue(); | ||
nerve.Train(); | ||
|
||
train_times++; | ||
} | ||
else break; | ||
} | ||
} | ||
void exam(char *file) | ||
{ | ||
ifstream in(file,ios::binary); | ||
Data data; | ||
vector<double> vec(N*N,0.0); | ||
vector<double> ans(10,0.0); | ||
while(1) | ||
{ | ||
in.read((char*)&data,sizeof(data)); | ||
if(in.gcount()!=0) | ||
{ | ||
for(int i=0;i<N*N;i++) | ||
vec[i]=data.point[i]; | ||
nerve.Input(vec); | ||
nerve.Figue(); | ||
ans=nerve.Output(); | ||
double maxx=0; | ||
int k=0; | ||
for(int i=0;i<10;i++) | ||
if(maxx<ans[i]) | ||
maxx=ans[i],k=i; | ||
if(k==data.ans)exam_A++; | ||
else exam_W++; | ||
} | ||
else break; | ||
} | ||
} | ||
void output_statistic(ostream &out) | ||
{ | ||
} | ||
}; | ||
int main() | ||
{ | ||
|
||
return 0; | ||
} |
Oops, something went wrong.