aboutsummaryrefslogtreecommitdiff
path: root/examples/ann_mlp_example4/gen_trainfile.pd
blob: 0f134e478aa2bfafb0dfccf473f76afb0c6ed10a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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;