diff options
Diffstat (limited to 'examples/ann_mlp_example4')
-rwxr-xr-x | examples/ann_mlp_example4/gen_trainfile-help.pd | 39 | ||||
-rwxr-xr-x | examples/ann_mlp_example4/gen_trainfile.pd | 180 | ||||
-rwxr-xr-x | examples/ann_mlp_example4/multidim_net.pd | 387 | ||||
-rwxr-xr-x | examples/ann_mlp_example4/test.txt | 7 | ||||
-rwxr-xr-x | examples/ann_mlp_example4/trainfile.dat | 9 | ||||
-rwxr-xr-x | examples/ann_mlp_example4/trainfile2.dat | 9 |
6 files changed, 631 insertions, 0 deletions
diff --git a/examples/ann_mlp_example4/gen_trainfile-help.pd b/examples/ann_mlp_example4/gen_trainfile-help.pd new file mode 100755 index 0000000..6c3f5bc --- /dev/null +++ b/examples/ann_mlp_example4/gen_trainfile-help.pd @@ -0,0 +1,39 @@ +#N canvas 711 130 586 632 10; +#X text 198 23 ::::_gen_trainfile_::::; +#X text 46 68 This abstraction generates a trainig file for ann_mlp +and ann_td; +#X obj 351 443 gen_trainfile; +#X msg 437 154 test.txt; +#X text 313 153 1) set filename:; +#X msg 394 215 4 2 1; +#X text 249 217 2) set file header:; +#X text 183 241 4 = nr. of training datasets; +#X text 184 255 2 = inputs of the neural net; +#X text 184 269 1 = output of the neural net; +#X msg 150 393 0 0 0; +#X msg 197 393 0 1 1; +#X msg 247 393 1 0 1; +#X msg 293 393 1 1 0; +#X text 46 116 Example:; +#X text 36 311 3) send training data (first inputs \, then output) +; +#X text 58 327 because you have now 4 training datasets you; +#X text 57 342 must pass 4 lists !!!; +#X text 162 374 a; +#X text 209 374 b; +#X text 259 375 c; +#X text 302 374 d; +#X floatatom 351 469 5 0 0 0 - - -; +#X obj 437 501 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 332 502 file is ready:; +#X text 238 468 added datasets:; +#X text 150 573 (c) 2005 \, Georg Holzmann <grh@mur.at>; +#X connect 2 0 22 0; +#X connect 2 1 23 0; +#X connect 3 0 2 2; +#X connect 5 0 2 1; +#X connect 10 0 2 0; +#X connect 11 0 2 0; +#X connect 12 0 2 0; +#X connect 13 0 2 0; diff --git a/examples/ann_mlp_example4/gen_trainfile.pd b/examples/ann_mlp_example4/gen_trainfile.pd new file mode 100755 index 0000000..0f134e4 --- /dev/null +++ b/examples/ann_mlp_example4/gen_trainfile.pd @@ -0,0 +1,180 @@ +#N canvas 60 0 578 726 10; +#X obj 60 466 inlet; +#X text 95 228 <nr of tests> <nr of inputs> <nr of outputs>; +#X text 98 248 nr of tests = with how many datasets; +#X text 197 262 should be trained; +#X text 97 282 nr of inputs = inputs of the neural net; +#X text 98 304 nr of outputs = outputs of the neural net; +#X text 100 380 <input1> <input2> ... <output1> <output2> ...; +#X obj 418 542 textfile; +#X text 59 190 1) set filename at 3.inlet; +#X text 59 210 2) set the following list at 2 inlet:; +#X text 61 334 3) pass the datasets as a list (one after the other) +into 1.inlet \, one list contains the input and desired output values +\, like:; +#X text 50 443 datalist; +#X obj 230 467 inlet; +#X text 229 448 header; +#X text 40 169 INLETS:; +#X obj 419 466 inlet; +#X text 410 447 filename; +#N canvas 0 0 450 300 write_header 0; +#X obj 30 29 inlet; +#X obj 30 67 t l b b; +#X obj 30 256 s \$0-textfile; +#X msg 74 97 clear; +#X msg 52 135 rewind; +#X msg 30 165 add \$1 \$2 \$3; +#X obj 170 79 unpack f f f; +#X obj 170 111 s \$0-size; +#X obj 209 138 s \$0-ins; +#X obj 181 206 s \$0-ok_for_new_datasets; +#X msg 181 180 1; +#X connect 0 0 1 0; +#X connect 0 0 6 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 1 2 3 0; +#X connect 1 2 10 0; +#X connect 3 0 2 0; +#X connect 4 0 2 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 8 0; +#X connect 10 0 9 0; +#X restore 230 493 pd write_header; +#X obj 418 521 r \$0-textfile; +#N canvas 672 100 450 561 write_datasets 0; +#X obj 25 34 inlet; +#X obj 25 487 outlet; +#X obj 242 160 niagara; +#X obj 298 159 r \$0-ins; +#X obj 303 223 lister; +#X msg 221 250 add; +#X obj 242 195 t b b l; +#X obj 303 245 t b l; +#X msg 304 271 add; +#X obj 273 340 s \$0-textfile; +#X obj 221 277 iem_append; +#X obj 304 298 iem_append; +#X obj 139 339 s \$0-write; +#X obj 62 92 r \$0-ok_for_new_datasets; +#X obj 25 115 spigot; +#X obj 25 143 t b l; +#N canvas 115 166 450 464 count_datasets 0; +#X obj 86 247 f; +#X obj 86 98 inlet; +#X msg 147 247 0; +#X obj 147 216 loadbang; +#X obj 86 366 outlet; +#X obj 116 247 + 1; +#X obj 86 284 % \$1; +#X text 89 74 bang; +#X text 248 125 modulo; +#X text 147 80 reset; +#X obj 249 268 - 1; +#X obj 230 304 sel; +#X obj 230 365 outlet; +#X text 219 389 bang after; +#X text 220 403 one circle; +#X text 83 389 numbers; +#X obj 201 248 f \$1; +#X obj 86 193 t b; +#X obj 249 146 r \$0-size; +#X obj 147 98 r \$0-ok_for_new_datasets; +#X obj 147 120 sel 1; +#X connect 0 0 6 0; +#X connect 1 0 17 0; +#X connect 2 0 0 1; +#X connect 3 0 2 0; +#X connect 3 0 16 0; +#X connect 5 0 0 1; +#X connect 6 0 5 0; +#X connect 6 0 4 0; +#X connect 6 0 11 0; +#X connect 10 0 11 1; +#X connect 11 0 12 0; +#X connect 16 0 10 0; +#X connect 17 0 0 0; +#X connect 18 0 6 1; +#X connect 18 0 10 0; +#X connect 19 0 20 0; +#X connect 20 0 2 0; +#X restore 25 237 pd count_datasets; +#X obj 139 396 s \$0-ok_for_new_datasets; +#X msg 139 376 0; +#X obj 139 487 outlet; +#X obj 25 58 t l b; +#N canvas 0 0 450 300 WARNINGS 0; +#X obj 20 22 inlet; +#X obj 20 114 == 0; +#X obj 36 54 r \$0-ok_for_new_datasets; +#X obj 20 206 print gen_trainfile_WARNING; +#X obj 20 81 f 0; +#X msg 20 178 file is full or create new header; +#X obj 20 141 sel 1; +#X connect 0 0 4 0; +#X connect 1 0 6 0; +#X connect 2 0 4 1; +#X connect 4 0 1 0; +#X connect 5 0 3 0; +#X connect 6 0 5 0; +#X restore 289 75 pd WARNINGS; +#X obj 25 461 + 1; +#X connect 0 0 20 0; +#X connect 2 0 6 0; +#X connect 2 1 4 1; +#X connect 3 0 2 1; +#X connect 4 0 7 0; +#X connect 5 0 10 0; +#X connect 6 0 4 0; +#X connect 6 1 5 0; +#X connect 6 2 10 1; +#X connect 7 0 8 0; +#X connect 7 1 11 1; +#X connect 8 0 11 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 13 0 14 1; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 15 1 2 0; +#X connect 16 0 22 0; +#X connect 16 1 18 0; +#X connect 16 1 12 0; +#X connect 16 1 19 0; +#X connect 18 0 17 0; +#X connect 20 0 14 0; +#X connect 20 1 21 0; +#X connect 22 0 1 0; +#X restore 60 495 pd write_datasets; +#X text 39 118 NEEDED EXTERNALS: zexy and iemlib (http://pd.iem.at) +; +#N canvas 832 484 389 329 write_file 0; +#X obj 29 37 inlet; +#X obj 96 151 symbol; +#X obj 96 91 r \$0-write; +#X msg 96 177 write \$1 cr; +#X obj 96 203 s \$0-textfile; +#X obj 133 126 symbol; +#X connect 0 0 5 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 5 0 1 1; +#X restore 419 488 pd write_file; +#X text 40 137 HOW TO Use it: (see also help file); +#X obj 60 561 outlet; +#X obj 222 563 outlet; +#X text 48 583 written datasets; +#X text 216 585 file is ready and written (bang); +#X text 134 658 (c) 2005 \, Georg Holzmann <grh@mur.at>; +#X text 72 72 This abstraction generates a trainig file for ann_mlp +and ann_td.; +#X text 192 25 ::::_gen_trainfile_::::; +#X connect 0 0 19 0; +#X connect 12 0 17 0; +#X connect 15 0 21 0; +#X connect 18 0 7 0; +#X connect 19 0 23 0; +#X connect 19 1 24 0; diff --git a/examples/ann_mlp_example4/multidim_net.pd b/examples/ann_mlp_example4/multidim_net.pd new file mode 100755 index 0000000..41acb5f --- /dev/null +++ b/examples/ann_mlp_example4/multidim_net.pd @@ -0,0 +1,387 @@ +#N canvas 57 0 663 539 10; +#X obj 396 55 grid grid1 200 -1 1 200 -1 1 1 0.001 0.001 2 2 450 248 +; +#X floatatom 396 261 5 0 0 0 - - -; +#X floatatom 589 262 5 0 0 0 - - -; +#X obj 397 278 pack f f; +#X obj 81 136 h_vector sample_pool; +#X msg 183 119 print; +#N canvas 143 0 450 300 pushback 0; +#X obj 22 21 inlet; +#X msg 22 120 pushback; +#X obj 22 195 outlet; +#X obj 22 156 iem_append; +#X obj 22 76 t b a; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 4 1 3 1; +#X restore 81 97 pd pushback; +#X msg 183 98 clear; +#X text 37 27 add new datasets to the vector:; +#N canvas 504 132 747 729 train_net_on_datasets 0; +#X obj 116 562 gen_trainfile; +#X text 91 404 2) step through all; +#X text 85 108 1) create net; +#X text 106 151 a) get nr. of inputs:; +#X obj 122 205 h_vector sample_pool; +#X msg 122 183 get 0; +#X obj 122 227 length; +#X obj 122 249 - 1; +#X text 297 151 b) get nr. of outputs:; +#X obj 314 199 h_vector sample_pool; +#X msg 314 178 getsize; +#X obj 122 129 t b b; +#X obj 122 288 pack 0 0 0; +#X obj 122 345 s \$0-to_net; +#X obj 46 41 inlet; +#X obj 159 488 pack 0 0 0 0; +#X msg 159 536 \$2 \$3 \$4; +#N canvas 754 184 450 454 step_through_datas 0; +#X obj 21 20 inlet; +#X obj 79 423 outlet; +#X obj 130 99 h_vector sample_pool; +#X msg 130 79 getsize; +#X obj 21 138 h_for; +#X obj 21 213 h_vector sample_pool; +#X msg 21 191 get \$1; +#X obj 21 257 niagara 1; +#X text 62 278 input; +#X obj 21 48 t b b; +#X obj 21 164 t f f; +#X obj 203 257 h_muxlist; +#X text 183 279 output; +#X obj 79 353 glue; +#X connect 0 0 9 0; +#X connect 2 1 4 1; +#X connect 2 1 11 1; +#X connect 3 0 2 0; +#X connect 4 0 10 0; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 7 1 13 0; +#X connect 9 0 4 0; +#X connect 9 1 3 0; +#X connect 10 0 6 0; +#X connect 10 1 11 0; +#X connect 11 0 13 1; +#X connect 13 0 1 0; +#X restore 116 458 pd step_through_datas; +#X obj 116 429 t b b b; +#X text 65 601 3) train the net on it; +#X msg 202 512 tmp/trainfile.dat; +#X obj 46 694 s \$0-to_net; +#X obj 46 68 t b b b; +#X msg 106 623 FANN_TRAIN_RPROP; +#X msg 106 646 FANN_TRAIN_QUICKPROP; +#X obj 46 577 t b b; +#X obj 187 265 * 2; +#X msg 46 671 train-on-file tmp/trainfile.dat; +#X msg 122 314 create \$1 \$2 3 \$3 1 0.7; +#X msg 363 612 set_activation_function_output FANN_LINEAR; +#X msg 364 583 set_activation_function_hidden FANN_LINEAR; +#X msg 372 669 randomize_weights -0.1 0.1; +#X msg 365 643 desired_error 0.001; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 6 0 7 0; +#X connect 7 0 12 0; +#X connect 7 0 15 2; +#X connect 9 1 12 1; +#X connect 9 1 15 3; +#X connect 9 1 15 1; +#X connect 9 1 26 0; +#X connect 10 0 9 0; +#X connect 11 0 5 0; +#X connect 11 1 10 0; +#X connect 12 0 28 0; +#X connect 14 0 22 0; +#X connect 15 0 16 0; +#X connect 16 0 0 1; +#X connect 17 0 0 0; +#X connect 18 0 17 0; +#X connect 18 1 15 0; +#X connect 18 2 20 0; +#X connect 20 0 0 2; +#X connect 22 0 25 0; +#X connect 22 1 18 0; +#X connect 22 2 11 0; +#X connect 24 0 21 0; +#X connect 25 0 27 0; +#X connect 25 1 31 0; +#X connect 25 1 32 0; +#X connect 25 1 24 0; +#X connect 26 0 12 2; +#X connect 27 0 21 0; +#X connect 28 0 13 0; +#X connect 31 0 21 0; +#X connect 32 0 21 0; +#X restore 80 222 pd train_net_on_datasets; +#X text 37 178 generate new net and train it on the datasets:; +#X text 35 263 the neural net:; +#N canvas 0 564 450 300 nn_for_samples 0; +#X obj 72 63 r \$0-to_net; +#X obj 72 125 h_maxlist; +#X obj 72 243 outlet; +#X text 72 267 index; +#X obj 177 198 h_vector sample_pool; +#X msg 177 175 get \$1; +#X obj 177 241 outlet; +#X text 176 263 samplename; +#X obj 177 219 unpack s; +#X obj 91 175 print; +#N canvas 265 255 690 335 training 0; +#X obj 71 288 outlet; +#X msg 82 195 FANN_TRAIN_INCREMENTAL; +#X msg 82 216 FANN_TRAIN_BATCH; +#X msg 81 238 FANN_TRAIN_RPROP; +#X msg 81 258 FANN_TRAIN_QUICKPROP; +#X text 40 28 you can set the training algorithm simply sending a message +with the name of the algorithm chosen. possible values are: FANN_TRAIN_INCREMENTAL +FANN_TRAIN_BATCH FANN_TRAIN_RPROP FANN_TRAIN_QUICKPROP the default +is: FANN_TRAIN_RPROP see the FANN manual for details on each algorithm: +http://fann.sourceforge.net/html/r1996.html; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X restore 215 58 pd training algorithm; +#N canvas 371 92 698 395 training 0; +#X obj 52 230 outlet; +#X msg 69 118 desired_error 0.01; +#X msg 79 146 max_iterations 500000; +#X msg 90 178 iterations_between_reports 1000; +#X text 58 28 you can change training parameters. see FANN manual for +details (http://fann.sourceforge.net); +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X restore 216 84 pd training params; +#N canvas 371 92 694 391 activation 0; +#X obj 49 335 outlet; +#X text 40 28 you can set ti output activation algorithm passing a +message to nn. see the FANN manual for description of the algorithms +; +#X msg 69 118 set_activation_function_output FANN_THRESHOLD; +#X msg 83 139 set_activation_function_output FANN_THRESHOLD_SYMMETRIC +; +#X msg 95 163 set_activation_function_output FANN_LINEAR; +#X msg 98 184 set_activation_function_output FANN_SIGMOID; +#X msg 106 206 set_activation_function_output FANN_SIGMOID_STEPWISE +; +#X msg 108 233 set_activation_function_output FANN_SIGMOID_SYMMETRIC +; +#X msg 115 256 set_activation_function_output FANN_SIGMOID_SYMMETRIC_STEPWISE +; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X restore 215 108 pd activation algorithm; +#X msg 109 33 print; +#X msg 114 9 learnrate 1; +#X obj 83 96 ann_mlp; +#X msg 235 20 load tmp/testnet.ann; +#X connect 0 0 15 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 4 0 8 0; +#X connect 5 0 4 0; +#X connect 8 0 6 0; +#X connect 13 0 15 0; +#X connect 14 0 15 0; +#X connect 15 0 1 0; +#X connect 15 0 9 0; +#X connect 16 0 15 0; +#X restore 90 293 pd nn_for_samples; +#X floatatom 90 310 5 0 0 0 index - -; +#X symbolatom 171 310 15 0 0 0 file - -; +#X obj 80 202 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 396 300 s \$0-to_net; +#N canvas 19 332 538 494 make_random_datasets_for_testing 0; +#X text 26 17 make 200 8-dimensional random datasets \, for testing +; +#X obj 152 158 h_randfloat -1 1; +#X obj 193 198 h_randfloat -1 1; +#X obj 170 178 h_randfloat -1 1; +#X obj 212 218 h_randfloat -1 1; +#X obj 276 157 h_randfloat -1 1; +#X obj 313 198 h_randfloat -1 1; +#X obj 294 177 h_randfloat -1 1; +#X obj 336 217 h_randfloat -1 1; +#X obj 43 377 pack s f f f f f f f f; +#X obj 43 126 t f b; +#X obj 43 261 makefilename sample%d.wav; +#X obj 43 438 outlet; +#X obj 43 52 inlet; +#X obj 108 52 inlet; +#X obj 43 91 h_for 10; +#X connect 1 0 9 1; +#X connect 2 0 9 3; +#X connect 3 0 9 2; +#X connect 4 0 9 4; +#X connect 5 0 9 5; +#X connect 6 0 9 7; +#X connect 7 0 9 6; +#X connect 8 0 9 8; +#X connect 9 0 12 0; +#X connect 10 0 11 0; +#X connect 10 1 1 0; +#X connect 10 1 3 0; +#X connect 10 1 2 0; +#X connect 10 1 4 0; +#X connect 10 1 5 0; +#X connect 10 1 7 0; +#X connect 10 1 6 0; +#X connect 10 1 8 0; +#X connect 11 0 9 0; +#X connect 13 0 15 0; +#X connect 14 0 15 1; +#X connect 15 0 10 0; +#X restore 158 387 pd make_random_datasets_for_testing; +#X obj 158 365 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 0 0 989 300 8-dimen-dataset 0; +#X obj 27 40 inlet; +#X obj 73 40 inlet; +#X obj 73 63 t b f; +#X obj 118 40 inlet; +#X obj 118 63 t b f; +#X obj 163 40 inlet; +#X obj 163 63 t b f; +#X obj 208 40 inlet; +#X obj 208 63 t b f; +#X obj 252 40 inlet; +#X obj 252 63 t b f; +#X obj 297 40 inlet; +#X obj 297 63 t b f; +#X obj 342 40 inlet; +#X obj 342 63 t b f; +#X obj 127 201 pack 0 0 0 0 0 0 0 0; +#X obj 337 257 outlet; +#X obj 422 39 inlet; +#X text 418 20 random; +#X obj 422 104 h_randfloat -1 1; +#X obj 477 145 h_randfloat -1 1; +#X obj 454 125 h_randfloat -1 1; +#X obj 496 165 h_randfloat -1 1; +#X obj 560 104 h_randfloat -1 1; +#X obj 597 145 h_randfloat -1 1; +#X obj 578 124 h_randfloat -1 1; +#X obj 620 164 h_randfloat -1 1; +#X obj 422 63 t b b; +#X obj 422 207 pack 0 0 0 0 0 0 0 0; +#X connect 0 0 15 0; +#X connect 1 0 2 0; +#X connect 2 0 15 0; +#X connect 2 1 15 1; +#X connect 3 0 4 0; +#X connect 4 0 15 0; +#X connect 4 1 15 2; +#X connect 5 0 6 0; +#X connect 6 0 15 0; +#X connect 6 1 15 3; +#X connect 7 0 8 0; +#X connect 8 0 15 0; +#X connect 8 1 15 4; +#X connect 9 0 10 0; +#X connect 10 0 15 0; +#X connect 10 1 15 5; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 12 1 15 6; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 14 1 15 7; +#X connect 15 0 16 0; +#X connect 17 0 27 0; +#X connect 19 0 28 0; +#X connect 20 0 28 2; +#X connect 21 0 28 1; +#X connect 22 0 28 3; +#X connect 23 0 28 4; +#X connect 24 0 28 6; +#X connect 25 0 28 5; +#X connect 26 0 28 7; +#X connect 27 0 19 0; +#X connect 27 1 23 0; +#X connect 27 1 21 0; +#X connect 27 1 25 0; +#X connect 27 1 20 0; +#X connect 27 1 24 0; +#X connect 27 1 22 0; +#X connect 27 1 26 0; +#X connect 28 0 16 0; +#X restore 467 441 pd 8-dimen-dataset; +#X obj 467 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 484 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 501 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 518 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 536 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 553 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 570 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 587 382 vsl 15 50 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X text 465 338 8 dimensional:; +#X obj 467 463 s \$0-to_net; +#X obj 600 442 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 511 353 0; +#X msg 377 370 250; +#X obj 420 92 cnv 15 1 1 empty empty 1 5 7 0 8 -241291 -241291 0; +#X obj 412 195 cnv 15 1 1 empty empty 2 5 7 0 8 -241291 -241291 0; +#X obj 415 215 cnv 15 1 1 empty empty 3 5 7 0 8 -241291 -241291 0; +#X obj 434 200 cnv 15 1 1 empty empty 4 5 7 0 8 -241291 -241291 0; +#X obj 476 160 cnv 15 1 1 empty empty 5 5 7 0 8 -241291 -241291 0; +#X obj 485 230 cnv 15 1 1 empty empty 6 5 7 0 8 -241291 -241291 0; +#X obj 501 177 cnv 15 1 1 empty empty 7 5 7 0 8 -241291 -241291 0; +#X obj 508 198 cnv 15 1 1 empty empty 8 5 7 0 8 -241291 -241291 0; +#X obj 526 125 cnv 15 1 1 empty empty 9 5 7 0 8 -241291 -241291 0; +#X obj 537 223 cnv 15 1 1 empty empty 0 5 7 0 8 -241291 -241291 0; +#X msg 50 64 sample9.wav 0.34 0.26; +#X msg 223 64 readXML tmp/2d-data.xml; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 1 0 3 0; +#X connect 2 0 3 1; +#X connect 3 0 16 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 4 0; +#X connect 12 0 13 0; +#X connect 12 1 14 0; +#X connect 15 0 9 0; +#X connect 18 0 17 0; +#X connect 19 0 29 0; +#X connect 20 0 19 0; +#X connect 21 0 19 1; +#X connect 22 0 19 2; +#X connect 23 0 19 3; +#X connect 24 0 19 4; +#X connect 25 0 19 5; +#X connect 26 0 19 6; +#X connect 27 0 19 7; +#X connect 30 0 19 8; +#X connect 31 0 20 0; +#X connect 31 0 21 0; +#X connect 31 0 22 0; +#X connect 31 0 23 0; +#X connect 31 0 24 0; +#X connect 31 0 25 0; +#X connect 31 0 26 0; +#X connect 31 0 27 0; +#X connect 32 0 17 1; +#X connect 43 0 6 0; +#X connect 44 0 4 0; diff --git a/examples/ann_mlp_example4/test.txt b/examples/ann_mlp_example4/test.txt new file mode 100755 index 0000000..c5cdf2b --- /dev/null +++ b/examples/ann_mlp_example4/test.txt @@ -0,0 +1,7 @@ +3 2 2 +4 9 +2 1 +5 3 +2 1 +2 4 +0 1 diff --git a/examples/ann_mlp_example4/trainfile.dat b/examples/ann_mlp_example4/trainfile.dat new file mode 100755 index 0000000..a053f7d --- /dev/null +++ b/examples/ann_mlp_example4/trainfile.dat @@ -0,0 +1,9 @@ +4 2 4
+-1 -1
+1 0 0 0
+1 -1
+0 1 0 0
+-1 1
+0 0 1 0
+1 1
+0 0 0 1
diff --git a/examples/ann_mlp_example4/trainfile2.dat b/examples/ann_mlp_example4/trainfile2.dat new file mode 100755 index 0000000..0d3eea7 --- /dev/null +++ b/examples/ann_mlp_example4/trainfile2.dat @@ -0,0 +1,9 @@ +4 2 24 +-0.5248 -0.4752 +-0.690478 -0.328445 0.787627 0.457685 0.785165 -0.609361 2.73531 -0.871147 -0.654311 -0.979694 -0.782768 -0.476533 -0.880441 -0.970331 -0.694041 -0.926005 -0.116742 -0.992307 -0.907731 0.220775 -0.719765 -1 1 -0.103331 +-0.6039 0.6138 +-0.107354 -0.437122 0.571922 0.56767 -0.0480328 -0.0436363 0.015686 -0.937416 -0.623195 -0.99371 -0.854111 -0.385827 -0.714651 -0.989703 -0.90756 -0.996025 -0.992405 -1 -1 0.405901 -0.0118679 -1 1 -0.0133747 +0.5545 0.6039 +-0.272313 -0.036396 0.248606 0.722645 -0.00976638 -0.905512 0.210309 -0.969341 -0.664621 -0.99696 -0.904754 -0.325938 -0.930082 -0.99386 -0.956322 -0.917093 0.0444865 -0.998078 -0.987068 0.468123 0.836558 -1 1 -0.024074 +0.5446 -0.5643 +0.480176 0.343487 0.0527416 0.789494 -0.45131 0.074421 0.647385 -0.942653 -0.760625 -0.993795 -0.840143 -0.820498 -0.926746 -0.992776 -0.938142 -0.830174 -0.155173 -1 -1 0.204588 -0.0142726 -1 1 -0.0610782 |