File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,21 @@ $ python main.py --simulation an_bn_cn -n 16
36
36
* Final and intermediate solutions are saved to the ` networks ` sub-directory, both as ` pickle ` and in visual ` dot ` format.
37
37
38
38
39
+ ## PyTorch conversion
40
+
41
+ Converting a network trained using the genetic algorithm to a PyTorch module:
42
+
43
+ ```
44
+ import torch_conversion
45
+
46
+ with open("networks/net.pickle", "rb") as f:
47
+ net = pickle.load(f)
48
+
49
+ torch_net = torch_conversion.mdlnn_to_torch(net)
50
+ ```
51
+
52
+ Then fine-tune and evaluate using [ MDLRNN-torch] ( https://github.com/0xnurl/mdlrnn-torch ) .
53
+
39
54
## Parallelization
40
55
41
56
Native Python multiprocessing is used by default. To use MPI, change ` migration_channel ` to ` mpi ` in ` simulations.py ` .
You can’t perform that action at this time.
0 commit comments