Loss not decreasing at all - issue when re-initializing model #1219
chrisBioInf
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just to make sure I am not crazy and the only one who stumbled here - I am in module 3 (Workflow) and I could, for the love of me, not get the loss value to actually decrease. Parameters, i.e. weight and bias, were also completely static, no matter how many epochs I run.
To check, I literally just copied the code:
Yet, I get the following output:
The issue here is, that I, in a previous cell, accidentally re-initialized my model by
calling
model_0 = LinearRegressionModel()
again, AFTER setting up my optimizer.It seems the optimizer gets strictly tied to the model instance, when it's parameters get passed over the first time - in hindsight this makes sense, but I would wish this would be pointed out in the course somewhere, as this is a mistake that can happen very easily and unnoticed.
Just a heads up, as I saw this topic pop up a few times now with no clear solution.
Beta Was this translation helpful? Give feedback.
All reactions