You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,36 @@ over time.
38
38
39
39
Check out the file "std_conf.h".
40
40
41
-
In std_conf.h you can edit the program. You can edit the hyperparameters such as learning rate etc, set the number of layers (2/3 is best I think), set how often it should output data etc. If you edit this file, you edit the source code and you will need to rebuild the program with the command "make". Enjoy! :)
41
+
In std_conf.h you can edit the program. You can edit the hyperparameters such as learning rate etc, set the number of layers (2/3 is best I think), set how often it should output data etc. If you edit this file, you edit the source code and you will need to rebuild the program with the command "make". You can also use input arguments to set some of the behaviour.
42
+
43
+
Running the program with no arguments triggers the help output to be displayed. This help shows what flags can be
44
+
passed as arguments to the program to modify its behaviour. The output looks like this:
45
+
46
+
<pre>
47
+
Usage: ./net datafile [flag value]*
48
+
49
+
Flags can be used to change the training procedure.
50
+
The flags require a value to be passed as the following argument.
51
+
E.g., this is how you traing with a learning rate set to 0.03:
52
+
./net datafile -lr 0.03
53
+
54
+
The following flags are available:
55
+
-r : read a previously trained network, the name of which is currently configured to be 'lstm_net.net'.
56
+
-lr: learning rate that is to be used during training, see the example above.
57
+
-it: the number of iterations used for training (not to be confused with epochs).
58
+
-mb: mini batch size.
59
+
-dl: decrease the learning rate over time, according to lr(n+1) <- lr(n) / (1 + n/value).
60
+
-st: number of iterations between how the network is continously stored during training (.json and .net).
61
+
62
+
Check std_conf.h to see what default values are used, these are set during compilation.
63
+
64
+
./net compiled Feb 14 2019 13:41:44
65
+
</pre>
66
+
67
+
The -st flags is great. Per default the network is stored upon interrupting the program with Ctrl-C. But using this argument, you can let the program train and have it store the network continously during the training process.
68
+
In that case the network is avaiable for you even if the program is unexpectedly terminated.
69
+
70
+
Enjoy! :)
42
71
43
72
# Examples
44
73
I trained this program to read the first Harry Potter book, It produced quotes such as this:
0 commit comments