Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit 0c715b9

Browse files
authored
Fixes error of #22, #15 in Jupyter Notebook
This commit is similar to `https://github.com/spro/practical-pytorch/commit/f5916ffe461098527c763048a9b11519eab342b9`. As mentioned, the `output` part is re-factored to reflect the changes of the above commit, into the Jupyter Notebook as well.
1 parent 09de232 commit 0c715b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

char-rnn-generation/char-rnn-generation.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
"\n",
342342
" for c in range(chunk_len):\n",
343343
" output, hidden = decoder(inp[c], hidden)\n",
344-
" loss += criterion(output.view(-1), target[c])\n",
344+
" loss += criterion(output, target[c])\n",
345345
"\n",
346346
" loss.backward()\n",
347347
" decoder_optimizer.step()\n",

0 commit comments

Comments
 (0)