diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | config.mk | 1 | ||||
-rw-r--r-- | utils/settings.cfg | 10 |
4 files changed, 15 insertions, 6 deletions
@@ -31,6 +31,10 @@ install: all install -d $(MANPREFIX)/man1 install -m 644 doc/ml.1 $(MANPREFIX)/man1/ml.1 +install_config: + mkdir -p ~/.config/ml + sed "s!utils/weights.bin!${CFGPREFIX}/ml.weights!" utils/settings.cfg > ${CFGPREFIX}/ml.cfg + uninstall: rm -v $(BINPREFIX)/${BIN} rm -v $(MANPREFIX)/man1/ml.1 @@ -12,7 +12,9 @@ A simple neural network maker developed to train json data ``` git clone https://git.juanvalencia.xyz/ml cd ml +make sudo make install +make install_config ``` ## Uninstall @@ -22,16 +24,18 @@ sudo make uninstall ``` ## Usage + ``` Usage: ml train [Options] JSON_FILE or: ml predict [-o FILE] FILE -Train and predict json data Options: -h, --help Show this message -a, --alpha=ALPHA Learning rate (only works with train) -e, --epochs=EPOCHS Epochs to train the model (only works with train) -o, --output=FILE Output file (only works with predict) + -c, --config=FILE Configuration filepath [default=~/.config/ml/ml.cfg] + Examples: $ ml train -e 150 -a 1e-4 housing.json @@ -2,3 +2,4 @@ PREFIX ?= /usr/local BINPREFIX := $(PREFIX)/bin MANPREFIX := $(PREFIX)/share/man +CFGPREFIX := ~/.config/ml diff --git a/utils/settings.cfg b/utils/settings.cfg index eee85fc..83a0b62 100644 --- a/utils/settings.cfg +++ b/utils/settings.cfg @@ -1,15 +1,15 @@ [net] loss = square ; options (square) -epochs = 200 ; comment -alpha = 1e-2 +epochs = 500 ; comment +alpha = 1 weights_path = utils/weights.bin -inputs = x -labels = y +inputs = x, y +labels = z ; activation options (relu, sigmoid, softplus, leaky_relu) [layer] -neurons=20 +neurons=10 activation=sigmoid [outlayer] |