Finch
Finch, a simple neural network framework and visualizer that uses genetic networks to train.
Inspiration
We had both recently discovered the interesting field of evolutionary/genetic algorithms and we wanted to explore this area of research. This combined with the fact that we both have very little experience with creating and using neural networks provided us with a formidable challenge, and a great opportunity to expand our knowledge.
What it does
Finch allow a user to define and train a network via command line arguments for example:
finch -input=784 -output=10 -hidden=16,16 -population=4096 -mutation=0.1 -example=./data/mnist/mnist_pixel_data_32.csv -expected=./data/mnist/mnist_label_data_32.csv
The above parameters define a network that takes in 784 input values, outputs 10 values, and has 2 hidden layer (each with 16 neurons). The network has a mutation rate of 10% and trains on a small set of 32 MNIST digits.
Challenges we ran into
1) Issues with CLI/TUI framework: It's almost a common sense that Go is not good for building interactive user interfaces due to it's concurrent nature, and we chose to use a relatively new TUI framework, Bubble Tea, it was a bit of challenge figuring out how to integrate our massively parallel algorithm with the TUI.
2) Handling larger networks and data sets: Since Finch only uses the CPU it was quite slow when the program was single threaded. We overcame this performance issue by making Finch massively parallel, allowing for 100% CPU usage on all system cores.
Nix
The use of Nix is not required but strongly recommended, installation guide available here.
nix flake clone github:stepbrobd/finch --dest finch && cd finch
To start a dev shell:
nix develop .
To run directly:
nix run . -- -help
To build:
nix build .
Output binary will located at ./result/bin/finch.
License
The contents inside this repository, excluding all submodules, are licensed under the MIT License. Third-party file(s) and/or code(s) are subject to their original term(s) and/or license(s).
Built With
- ai
- genetic
- go
- ml
- nix
Log in or sign up for Devpost to join the conversation.