mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
* Revert "Add missing brace (#7762)" This reverts commitea27c5af50. * Revert "[C++ API] Add backward() to Tensor and Variable (#7750)" This reverts commit1e2762796f.
This commit is contained in:
committed by
Peter Goldsborough
parent
8d91a602cc
commit
60745b3380
@@ -203,7 +203,7 @@ bool test_mnist(
|
||||
Variable loss = at::nll_loss(x, y);
|
||||
|
||||
optim->zero_grad();
|
||||
loss.backward();
|
||||
backward(loss);
|
||||
optim->step();
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ TEST_CASE("integration") {
|
||||
auto loss = at::stack(policy_loss).sum() + at::stack(value_loss).sum();
|
||||
|
||||
optim->zero_grad();
|
||||
loss.backward();
|
||||
backward(loss);
|
||||
optim->step();
|
||||
|
||||
rewards.clear();
|
||||
|
||||
Reference in New Issue
Block a user