Skip to content

Video "PyTorch for Deep Learning & Machine Learning – Full Course" Coding error in model training and testing #917

Answered by LuluW8071
Rohi2610 asked this question in Q&A
Discussion options

You must be logged in to vote

The snippet of the code you provided has no errors works perfectly fine. I tried to replicate your error and closest i found was on defining weight and bias. There might be error(mistype) on that section.

weights = 0.7
bias = 0.3
start, end, step = 0, 1, 0.02

X = torch.arange(start, end, step).unsqueeze(dim=1)
y = weights * X + bias

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Rohi2610
Comment options

Answer selected by Rohi2610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants