From 79380fb90e33c2d387f26fec7d742fe387420e39 Mon Sep 17 00:00:00 2001 From: Morvan Zhou Date: Thu, 14 Jun 2018 22:20:51 +0800 Subject: [PATCH] fix typo --- tutorial-contents/403_RNN_regressor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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