Skip to content

Commit fad7759

Browse files
Nikolai Morinsoumith
authored andcommitted
Consistent newlines
1 parent 7532a61 commit fad7759

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

word_language_model/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def repackage_hidden(h):
108108
else:
109109
return tuple(repackage_hidden(v) for v in h)
110110

111+
111112
# get_batch subdivides the source data into chunks of length args.bptt.
112113
# If source is equal to the example output of the batchify function, with
113114
# a bptt-limit of 2, we'd get the following two Variables for i = 0:
@@ -117,6 +118,7 @@ def repackage_hidden(h):
117118
# done along the batch dimension (i.e. dimension 1), since that was handled
118119
# by the batchify function. The chunks are along dimension 0, corresponding
119120
# to the seq_len dimension in the LSTM.
121+
120122
def get_batch(source, i, evaluation=False):
121123
seq_len = min(args.bptt, len(source) - 1 - i)
122124
data = Variable(source[i:i+seq_len], volatile=evaluation)

0 commit comments

Comments
 (0)