Skip to content

Commit 537a0d7

Browse files
committed
update: code
1 parent d200d99 commit 537a0d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_optimizers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ def _closure() -> float:
7676
for _ in range(iterations):
7777
optimizer.zero_grad()
7878

79-
y_pred = model(x_data)
80-
loss = loss_fn(y_pred, y_data)
79+
loss = loss_fn(model(x_data), y_data)
8180

8281
if init_loss == np.inf:
8382
init_loss = loss

0 commit comments

Comments
 (0)