Rewrite for torch with following paper: Lingxi Xie and Alan L. Yuille Genetic CNN
Example
- num_stages = (6, 9, 8)
- binary_code_stages_model = {'S_1': '1-00-010-0110-00100', 'S_2': '0-00-000-1001-01101-001110-0101101-00001110', 'S_3': '1-01-001-1100-10011-011100-1100110'}
Stages | Stage | |||
---|---|---|---|---|
stages | binary_code_stages_model | binary_code | num_nodes | |
index | separated connections | |||
0 | S_1 | 1-00-010-0110-00100 | 100010011000100 | 6 |
1 | S_2 | 0-00-000-1001-01101-001110-0101101-00001110 | 000000100101101001110010110100001110 | 9 |
2 | S_3 | 1-01-001-1100-10011-011100-1100110 | 1010011100100110111001100110 | 8 |
run cells: import
, class Individual
, Train & test model for Individual
run cells: import
, class Population
, test
See example output in files test1.log, test2.log
- pytorch >= 1.9