Previous code would save a model only after converging, which was not the original intent. Move the saveModel(epoch) call to inner training loop. As a consequence, save in a properties file the epoch of the best model and use it when loading the network from file.
Also, as character trigram maps do not change per epoch, save them in a new saveParams method called only once.
Finally, remove the trainCounter variable, which seemed unused.
Add tests to ensure variables and prediction are working as expected.
Coverage increased (+1.4%) to 74.932% when pulling dafc7dde166e46828599bf51386b20696a881340 on michelole:issue-87 into 228b886082bc78b61ec9102a34ca65e45bd10095 on bst-mug:master.
Previous code would save a model only after converging, which was not the original intent. Move the
saveModel(epoch)
call to inner training loop. As a consequence, save in a properties file the epoch of the best model and use it when loading the network from file.Also, as character trigram maps do not change per epoch, save them in a new
saveParams
method called only once.Finally, remove the
trainCounter
variable, which seemed unused.Add tests to ensure variables and prediction are working as expected.