We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 921b69a commit 79380fbCopy full SHA for 79380fb
1 file changed
tutorial-contents/403_RNN_regressor.py
@@ -82,7 +82,7 @@ def forward(self, x, h_state):
82
# !! next step is important !!
83
h_state = h_state.data # repack the hidden state, break the connection from last iteration
84
85
- loss = loss_func(prediction, y) # cross entropy loss
+ loss = loss_func(prediction, y) # calculate loss
86
optimizer.zero_grad() # clear gradients for this training step
87
loss.backward() # backpropagation, compute gradients
88
optimizer.step() # apply gradients
0 commit comments