Skip to content

Latest commit

 

History

History
39 lines (39 loc) · 1.21 KB

README.md

File metadata and controls

39 lines (39 loc) · 1.21 KB

AK Laboratory Work 5

MIT License
Main.cpp contains implementation of one layer perceptron with only two weights and one bias. Output of executable is steps of perceptron training. Getopt/getopt_long instructions could be found here.
List of valid keys:

  • -h, --help, no arguments required;
  • -c, --cycles, arguments required in range (2, 4);
  • -t, --target, arguments optional list of 4 integers of 0's and 1's;
  • -l, --learning-rate, arguments optional, one positive integer, the little the better;

Commands for assembly

$ git clone https://github.com/chyzhyk16/AK_LW5.git
$ cmake ~/AK-LW5

Usage examples

$ ./main
$ ./main -h
$ ./main --help
$ ./main --cycles=4
$ ./main --cycles=3 --training-rate=1
$ ./main --cycles=2 --training-rate=2 --target=0,1,1,1
$ ./main -c 2 -l 2 --target=0,1,1,1
$ ./main --cycles=2 -t 0,1,1,1

Handling wrong keys

$ ./main -r --verbose
./main: invalid option -- 'r'
./main: unrecognized option '--verbose'