getting an error while looping the data #1021
Unanswered
dinesh2216
asked this question in
Q&A
Replies: 1 comment
-
loss = loss_fn not loss_fun, unless you've changed the name of the variable before the for loop. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello i am watching na 25hr pytorch course
code
'' epochs = 1
for epoch in range(epochs):
model_1.train()
y_pred = model_1(X_train)
loss = loss_fun(y_pred, y_train)
optimizer.zero_grad()
loss.backward()
optimizer.step()
''
Beta Was this translation helpful? Give feedback.
All reactions