diff --git a/tutorial-contents/403_RNN_regressor.py b/tutorial-contents/403_RNN_regressor.py index 354d308..c8b19ca 100644 --- a/tutorial-contents/403_RNN_regressor.py +++ b/tutorial-contents/403_RNN_regressor.py @@ -82,7 +82,7 @@ for step in range(100): # !! next step is important !! h_state = h_state.data # repack the hidden state, break the connection from last iteration - loss = loss_func(prediction, y) # cross entropy loss + loss = loss_func(prediction, y) # calculate loss optimizer.zero_grad() # clear gradients for this training step loss.backward() # backpropagation, compute gradients optimizer.step() # apply gradients