Skip to content

Conversation

@skleinbo
Copy link
Contributor

@skleinbo skleinbo commented Jun 2, 2022

Because depwarn is not imported from Base, calling update!(...) throws an UndefVarError.
Changed depwarn to Base.depwarn.

See https://discourse.julialang.org/t/flux-13-3-error-undefvarerror-depwarn-not-defined/82118

PR Checklist

  • Tests are added
  • Entry in NEWS.md
  • Documentation, if applicable

No tests for depwarns exist as far as I can tell, so I did not add one.
Changes to NEWS.md and the docs aren't necessary in my opinion.

@CarloLucibello
Copy link
Member

@skleinbo thank you for this. Since you are at it, would you mind also changing the second code block in this docs page to

η = 0.1 # Learning Rate
for p in (W, b)
  p .-= η * grads[p]
end

Second code block: `update!` -> `.-=`
Third code block: added `using Flux: update!`
@skleinbo
Copy link
Contributor Author

skleinbo commented Jun 2, 2022

@CarloLucibello Sure!

@CarloLucibello CarloLucibello merged commit a162245 into FluxML:master Jun 2, 2022
@skleinbo skleinbo deleted the patch-1 branch June 3, 2022 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants