textgenrnn icon indicating copy to clipboard operation
textgenrnn copied to clipboard

saving model file at certain epochs

Open ihavetoomanyquestions opened this issue 6 years ago • 1 comments

is there any functionality to save the model file at every k epochs? the reason is; when i train after a certain point the model overfits, so i want to save the model under a different name after every e.g. 100 epochs. i looked at the source code and found the following function:

self.model.save_weights()

but i am not sure where to call it..

ihavetoomanyquestions avatar Jun 11 '18 16:06 ihavetoomanyquestions

not quite sure but using parameter save_epochs might do it (passed to textgen.train_from_file)

neil-rubens avatar Jun 08 '19 12:06 neil-rubens