finch

module
v0.0.0-...-fd68bf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2023 License: MIT

README

Finch

Finch, a simple neural net framework and visualizer that uses genetic networks to train.

Finch

Idea from Darwin by @pehringer.

Running Finch on example datasets

Gates:

-input=2 -output=1 -hidden=2

2 input neurons, 1 output neuron, 1 hidden layer with 2 neurons

-population=128 -mutation=0.025

128 individules in the population, with 2.5% mutation rate

-example=./data/gates/input_data.csv -expected=./data/gates/{or,nor,xor}_label_data.csv

dataset paths

finch -input=2 -output=1 -hidden=2 -population=128 -mutation=0.025 -example=./data/gates/input_data.csv -expected=./data/gates/{or,nor,xor}_label_data.csv

Remember to change which operation you want to run: OR, NOR, XOR.

Math:

-input=20 -output=19 -hidden=6,6,6,6

20 input neurons, 19 output neurons, 4 hidden layers with 6 neurons each

-population=32768 -mutation=0.01

32768 individules in the population, with 1% mutation rate

-example=./data/math/add_input_data.csv -expected=./data/math/add_output_data.csv

dataset paths

finch -input=20 -output=19 -hidden=6,6,6,6 -population=32768 -mutation=0.01 -example=./data/math/add_input_data.csv -expected=./data/math/add_output_data.csv

MNIST:

-input=784 -output=10 -hidden=16,16

784 input neurons (28x28 greyscale images), 10 output neurons (numbers 1-10), 2 hidden layers with 16 neurons each

-population=4096 -mutation=0.1

4096 individules in the population, with 10% mutation rate

-example=./data/mnist/mnist_pixel_data_{32,64,128,256,512,1024,2048,4096,8192}.csv -expected=./data/mnist/mnist_label_data_{32,64,128,256,512,1024,2048,4096,8192}.csv

dataset paths

finch -input=784 -output=10 -hidden=16,16 -population=4096 -mutation=0.1 -example=./data/mnist/mnist_pixel_data_{32,64,128,256,512,1024,2048,4096,8192}.csv -expected=./data/mnist/mnist_label_data_{32,64,128,256,512,1024,2048,4096,8192}.csv

Remember to change the size of MNIST dataset: 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192.

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).

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL