1 / 5

Compiling the MLP programs

Compiling the MLP programs. Create a folder to work in Download ALL .c files to this folder MLPInit.c MLPTrain.c MLPClass.c MLPLib.c MLPReadWrite.c Use Visual Studio .NET command line compiler E.g: cl MLPInit.c cl mlpinit.c will also work. Running the MLP programs.

gwylan
Download Presentation

Compiling the MLP programs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Compiling the MLP programs • Create a folder to work in • Download ALL .c files to this folder • MLPInit.c • MLPTrain.c • MLPClass.c • MLPLib.c • MLPReadWrite.c • Use Visual Studio .NET command line compiler • E.g: • cl MLPInit.c • cl mlpinit.c will also work

  2. Running the MLP programs • Start with MLPInit • Make sure mlpconfig is in your current folder • If it’s called mlpconfig.txt, then • EITHER: Change its name to mlpconfig (ren mlpconfig.txt mlpconfig), • OR: edit MLPLib.c, change • if ((config=fopen("mlpconfig","r"))==NULL) , to • if ((config=fopen("mlpconfig.txt","r"))==NULL) • Run program from command line, e.g: • MLPInit 3 5 10 init-3x5x10 • This will create an MLP with 3 input units, 5 hidden units and 10 output units and save it in init-3x5x10

  3. Running the MLP programs • Similarly • run MLPTrain to train your MLP • run MLPClass to use your MLP to classify data • E.G 1 • MLPTrain init pbData_m_f1f2_train.txt 100 trmlp • This will • Use the data in file init to define the initial MLP • Use pbData_m_f1f2_train.txt as training data • Run 100 iterations of the Error Back Propagation algorithm • Put the results in trmlp

  4. Running the MLP programs • Similarly • run MLPClass to use your MLP to classify data • E.G 2 • MLPClass trmlp pbData_m_f1f2_test.txt • This will • Use the data in file trmlp to define the MLP • Use pbData_m_f1f2_test.txt as test data • Print out the error rate

  5. Running the MLP Programs • Make sure mlpconfig is in your folder! • Example mlpconfig • <KSCALE> controls the slope of the sigmoid function (see slide 11 from last week) • <LRATE> controls the learning rate • <MOMENTUM> is the momentum – it controls the ‘stability’ of the learning process • <TRMODE> can either be BATCH or SEQUENTIAL <KSCALE> 1.0 <LRATE> 1.0 <MOMENTUM> 0.0 <TRMODE> BATCH

More Related