(source, i)
| 134 | # to the seq_len dimension in the LSTM. |
| 135 | |
| 136 | def get_batch(source, i): |
| 137 | seq_len = min(args.bptt, len(source) - 1 - i) |
| 138 | data = source[i:i+seq_len] |
| 139 | target = source[i+1:i+1+seq_len].view(-1) |
| 140 | return data, target |
| 141 | |
| 142 | |
| 143 | def evaluate(data_source): |