The
Flux.train!(loss, Params([model.W]), dataset, opt, cb=evalcb)
does not work for me. The params[] remains blank. It seems that we cannot access the attribute in a function. But maintaining a struct to hold parameters works. Now the train! will update the parameters and decrease the loss. Thank you very much!