-
-
Notifications
You must be signed in to change notification settings - Fork 489
Commit de62f66
PyGAD 2.10.1 Documentation
1. In the `gene_space` parameter, any `None` value (regardless of its index or axis), is replaced by a randomly generated number based on the 3 parameters `init_range_low`, `init_range_high`, and `gene_type`. So, the `None` value in `[..., None, ...]` or `[..., [..., None, ...], ...]` are replaced with random values. This gives more freedom in building the space of values for the genes.
2. All the numbers passed to the `gene_space` parameter are casted to the type specified in the `gene_type` parameter.
3. The `numpy.uint` data type is supported for the parameters that accept integer values.
4. In the `pygad.kerasga` module, the `model_weights_as_vector()` function uses the `trainable` attribute of the model's layers to only return the trainable weights in the network. So, only the trainable layers with their `trainable` attribute set to `True` (`trainable=True`), which is the default value, have their weights evolved. All non-trainable layers with the `trainable` attribute set to `False` (`trainable=False`) will not be evolved. Thanks to [Prof. Tamer A. Farrag](https://github.com/tfarrag2000) for pointing about that at [GitHub](ahmedfgad/KerasGA#1).1 parent 6deb2c0 commit de62f66
File tree
4 files changed
+66
-28
lines changed- docs/source
4 files changed
+66
-28
lines changedLines changed: 33 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
461 | 461 |
| |
462 | 462 |
| |
463 | 463 |
| |
464 | - | ||
464 | + | ||
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
| |||
509 | 509 |
| |
510 | 510 |
| |
511 | 511 |
| |
512 | + | ||
513 | + | ||
514 | + | ||
515 | + | ||
516 | + | ||
517 | + | ||
518 | + | ||
519 | + | ||
520 | + | ||
521 | + | ||
522 | + | ||
523 | + | ||
524 | + | ||
525 | + | ||
526 | + | ||
527 | + | ||
528 | + | ||
529 | + | ||
530 | + | ||
531 | + | ||
532 | + | ||
533 | + | ||
534 | + | ||
535 | + | ||
536 | + | ||
537 | + | ||
538 | + | ||
539 | + | ||
540 | + | ||
541 | + | ||
542 | + | ||
543 | + | ||
512 | 544 |
| |
513 | 545 |
| |
514 | 546 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
135 | - | ||
135 | + | ||
136 | 136 |
| |
137 | 137 |
| |
138 | - | ||
138 | + | ||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
|
Lines changed: 30 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | - | ||
1 | + | ||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 | - | ||
28 | + | ||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 | - | ||
48 | + | ||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
96 | - | ||
96 | + | ||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
| |||
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
106 | - | ||
106 | + | ||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 | - | ||
119 | + | ||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 | - | ||
137 | + | ||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 | - | ||
145 | + | ||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
155 | - | ||
155 | + | ||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
162 | - | ||
162 | + | ||
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 | + | ||
174 | + | ||
175 | + | ||
176 | + | ||
177 | + | ||
178 | + | ||
173 | 179 |
| |
174 | 180 |
| |
175 | 181 |
| |
176 | 182 |
| |
177 | 183 |
| |
178 | 184 |
| |
179 | - | ||
185 | + | ||
180 | 186 |
| |
181 | 187 |
| |
182 | 188 |
| |
| |||
190 | 196 |
| |
191 | 197 |
| |
192 | 198 |
| |
193 | - | ||
199 | + | ||
194 | 200 |
| |
195 | 201 |
| |
196 | 202 |
| |
| |||
199 | 205 |
| |
200 | 206 |
| |
201 | 207 |
| |
202 | - | ||
208 | + | ||
203 | 209 |
| |
204 | 210 |
| |
205 | 211 |
| |
| |||
296 | 302 |
| |
297 | 303 |
| |
298 | 304 |
| |
299 | - | ||
305 | + | ||
300 | 306 |
| |
301 | 307 |
| |
302 | 308 |
| |
| |||
328 | 334 |
| |
329 | 335 |
| |
330 | 336 |
| |
331 | - | ||
337 | + | ||
332 | 338 |
| |
333 | 339 |
| |
334 | 340 |
| |
| |||
344 | 350 |
| |
345 | 351 |
| |
346 | 352 |
| |
347 | - | ||
353 | + | ||
348 | 354 |
| |
349 | 355 |
| |
350 | 356 |
| |
| |||
369 | 375 |
| |
370 | 376 |
| |
371 | 377 |
| |
372 | - | ||
378 | + | ||
373 | 379 |
| |
374 | 380 |
| |
375 | 381 |
| |
| |||
400 | 406 |
| |
401 | 407 |
| |
402 | 408 |
| |
403 | - | ||
409 | + | ||
404 | 410 |
| |
405 | 411 |
| |
406 | 412 |
| |
| |||
435 | 441 |
| |
436 | 442 |
| |
437 | 443 |
| |
438 | - | ||
444 | + | ||
439 | 445 |
| |
440 | 446 |
| |
441 | 447 |
| |
| |||
508 | 514 |
| |
509 | 515 |
| |
510 | 516 |
| |
511 | - | ||
517 | + | ||
512 | 518 |
| |
513 | 519 |
| |
514 | 520 |
| |
| |||
679 | 685 |
| |
680 | 686 |
| |
681 | 687 |
| |
682 | - | ||
688 | + | ||
683 | 689 |
| |
684 | 690 |
| |
685 | 691 |
| |
| |||
789 | 795 |
| |
790 | 796 |
| |
791 | 797 |
| |
792 | - | ||
798 | + | ||
793 | 799 |
| |
794 | 800 |
| |
795 | 801 |
| |
| |||
839 | 845 |
| |
840 | 846 |
| |
841 | 847 |
| |
842 | - | ||
848 | + | ||
843 | 849 |
| |
844 | 850 |
| |
845 | 851 |
| |
| |||
974 | 980 |
| |
975 | 981 |
| |
976 | 982 |
| |
977 | - | ||
983 | + | ||
978 | 984 |
| |
979 | 985 |
| |
980 | 986 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | - | ||
25 | + | ||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
|
0 commit comments