Having problems while following the video(section 108) #276
-
|
Video: https://youtu.be/Z_ikDlimN6A?t=60117
I receive this error: When trying to run this code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Pffft. Found the issue, a pretty silly one, I somehow forgot to add this line of code: So when I was trying to do So the fix would be this: |
Beta Was this translation helpful? Give feedback.

Pffft.
Found the issue, a pretty silly one, I somehow forgot to add this line of code:
loss = loss_fn(y_pred, y)So when I was trying to do
loss.backward()the value was not getting reset and just used thelossvariable that was defined somewhere earlier in the code(outside of this function)So the fix would be this: