Skip to content

Commit a4b0aba

Browse files
authored
fix the issue PR pytorch#799 left (pytorch#781)
1 parent 984700d commit a4b0aba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regression/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_batch(batch_size=32):
5757

5858
# Apply gradients
5959
for param in fc.parameters():
60-
param.add_(-0.1 * param.grad)
60+
param.data.add_(-0.1 * param.grad)
6161

6262
# Stop criterion
6363
if loss < 1e-3:

0 commit comments

Comments
 (0)