Replies: 1 comment 1 reply
-
Looks like you gave wrong input data weight = 0.3
bias = 0.7
start = 0
end = 1
step = 0.02
# or you can do
# start, end, step = 1, 0, -0.02
X=torch.arange(start,end,step).unsqueeze(dim=1)
y=(weight*X)+bias |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Timestamp 7:50:00
PyTorch workflow section exercise
Issue:My model is not updating its parameters(weight & bias) to minimize the Loss when I run the training loop.(Note that I have created training & testing split using shuffling of indices instead of straight away slicing the dataset into 2 parts)
Notebook:https://colab.research.google.com/drive/19LTNh8uftVZ5V71I2HEpIZz3t9HtISND#scrollTo=NhScv2GWbUxL
I tried setting the random_seed value to the same number(42) everywhere,The learning rate is set to 0.01(mentioned in the exercise),I tried changing it but I am not able to fix this(I did the saving & loading part of the exercise mindlessly even when the model isn't working).
I believe all the data is of the same d-type with requires_grad=True and on the same device as the model...
I am facing the same issue in the next few topics
Beta Was this translation helpful? Give feedback.
All reactions