Category : C++ Source Code
Archive   : NEURCSP.ZIP
Filename : NEURAL.CPP
#include
#include
#include
#include "neural.hpp"
int main(int argc, char** argv)
{
if(!argc == 2)
{
cerr<<"USAGE: NEURAL infile\n";
exit(1);
}
Network net;
if(net.trainingFile(argv[1]) == false)
{
cerr<<"Error in initializing net\n";
exit(2);
}
#ifdef DISPLAY_YES
CLEAR_SCREEN();
#endif
randomize();
time_t startTime;
time(&startTime);
for(;;){
net.forwardPass();
net.backwardProp();
net.displayDiff();
if(net.atEpochEnd())
{
if(kbhit())
break;
if(net.trained())
break;
net.displayTotalError();
net.zeroTotalError();
#ifdef DISPLAY_YES
CURSOR_GOTO(1,1);
#endif
}
}
time_t endTime;
time(&endTime);
net.allForward();
cin.get();
net.display();
unsigned long elapsed = (unsigned) endTime - (unsigned) startTime;
net.displayPerformance(elapsed);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/