diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b38baccae3..2ca5034548 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ One of the best ways to contribute is by looking at issues labeled ["help wanted ## Good First Issues -While there are not many right now, we do have a section for ["good for issues"](https://github.com/FluxML/Flux.jl/labels/good%20first%20issue). As mentioned above, if any of these seem interesting but there is no clear next step in your mind, please feel free to ask for a suggested step. Often times in open source, issues labeled as "good first issue" actually take some back and forth between maintainers and contributors before the issues is ready to be tackled by a new contributor. +While there are not many right now, we do have a section for ["good first issues"](https://github.com/FluxML/Flux.jl/labels/good%20first%20issue). As mentioned above, if any of these seem interesting but there is no clear next step in your mind, please feel free to ask for a suggested step. Often times in open source, issues labeled as "good first issue" actually take some back and forth between maintainers and contributors before the issues is ready to be tackled by a new contributor. ## Model Zoo diff --git a/docs/src/saving.md b/docs/src/saving.md index 2e64219bb5..b1771cd5a0 100644 --- a/docs/src/saving.md +++ b/docs/src/saving.md @@ -118,10 +118,13 @@ revert to an older copy of the model if it starts to overfit. @save "model-$(now()).bson" model loss = testloss() ``` -You can even store optimiser state alongside the model, to resume training -exactly where you left off. +Note that to resume a model's training, you might need to restore other stateful parts of your training loop. Possible examples are stateful optimizers (which usually utilize an `IdDict` to store their state), and the randomness used to partition the original data into the training and validation sets. + +You can store the optimiser state alongside the model, to resume training +exactly where you left off. BSON is smart enough to [cache values](https://github.com/JuliaIO/BSON.jl/blob/v0.3.4/src/write.jl#L71) and insert links when saving, but only if it knows everything to be saved up front. Thus models and optimizers must be saved together to have the latter work after restoring. ```julia opt = ADAM() @save "model-$(now()).bson" model opt ``` +