From 2bdb7f195f8918bab0073dd456e08d77da0d0889 Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Fri, 27 May 2022 14:26:50 -0400 Subject: [PATCH 1/2] Show `using Flux` before BSON `@load` To a novice, it is not obvious that `Flux` module must be in scope before one can `@load` a model saved with `BSON.@save`. This small change makes that requirement explicit. --- docs/src/saving.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/saving.md b/docs/src/saving.md index 53fcf52630..8beb0d6057 100644 --- a/docs/src/saving.md +++ b/docs/src/saving.md @@ -24,6 +24,8 @@ julia> @save "mymodel.bson" model Load it again: ```jldoctest saving +julia> using Flux # must precede @load + julia> using BSON: @load julia> @load "mymodel.bson" model From f0e302168d3638dc055f1a45648e3baab6f3c187 Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Fri, 27 May 2022 22:08:19 -0400 Subject: [PATCH 2/2] Refining wording --- docs/src/saving.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/saving.md b/docs/src/saving.md index 8beb0d6057..2ec6d94372 100644 --- a/docs/src/saving.md +++ b/docs/src/saving.md @@ -24,7 +24,7 @@ julia> @save "mymodel.bson" model Load it again: ```jldoctest saving -julia> using Flux # must precede @load +julia> using Flux # Flux must be loaded before calling @load julia> using BSON: @load