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

Commit f5916ff

Browse files
committed
unnecessary output.view; fixes #22, fixes #15
1 parent 2fd4c11 commit f5916ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

char-rnn-generation/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def train(inp, target):
4646

4747
for c in range(args.chunk_len):
4848
output, hidden = decoder(inp[c], hidden)
49-
loss += criterion(output.view(-1), target[c])
49+
loss += criterion(output, target[c])
5050

5151
loss.backward()
5252
decoder_optimizer.step()

0 commit comments

Comments
 (0)