A typical program to train a net may look like this:
loadNet("encoder.net") loadPattern("encoder.pat") setInitFunc("Randomize_Weights", 1.0, -1.0) initNet() while SSE > 6.9 and CYCLES < 1000 do if CYCLES mod 10 == 0 then print ("cycles = ", CYCLES, " SSE = ", SSE) endif trainNet() endwhile saveResult("encoder.res", 1, PAT, TRUE, TRUE, "create") saveNet("encoder.trained.net") print ("Cycles trained: ", CYCLES) print ("Training stopped at error: ", SSE)
This batch program loads the neural net `encoder.net' and the corresponding pattern file. Now the net is initialized. A training process continues until the SSE error is smaller or equal to 6.9. The trained net and the result file are saved once the training is completed. The following output is generated by this program:
Net encoder.net loaded Patternset encoder.pat loaded; 1 patternset(s) in memory Init function is now Randomize_Weights Net initialised cycles = 0 SSE = 3.40282e+38 cycles = 10 SSE = 7.68288 cycles = 20 SSE = 7.08139 cycles = 30 SSE = 6.95443 Result file encoder.res written Network file encoder.trained.net written Cycles trained: 40 Training stopped at error: 6.89944