SciML / SciMLBook

Parallel Computing and Scientific Machine Learning (SciML): Methods and Applications (MIT 18.337J/6.338J)

Home Page:https://book.sciml.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two code errors in Lecture 3 Notes (probably due to Flux library changes)

MatthewAHarvey opened this issue · comments

Suggest Correction

  1. Line 378 in https://github.com/SciML/SciMLBook/blob/master/_weave/lecture03/sciml.jmd
NN[1].weights # The W matrix of the first layer

produces ERROR: type Dense has no field weights:
image

I think the line should read

NN[1].weight # The W matrix of the first layer

(weight instead of weights)

  1. Line 384 also in https://github.com/SciML/SciMLBook/blob/master/_weave/lecture03/sciml.jmd
p = params(NN)

Produces ERROR: UndefVarError: params not defined
image

I don't think Flux is exposing params with the using Flux command any more so I think the line should now read

p = Flux.params(NN)

Those screenshots are taken from https://book.sciml.ai/notes/03/