Skip to content

Commit f64c7c7

Browse files
Removed unused code
1 parent f73f67e commit f64c7c7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tutorials/02-intermediate/language_model/data_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ def __len__(self):
1919
class Corpus(object):
2020
def __init__(self, path='./data'):
2121
self.dictionary = Dictionary()
22-
self.train = os.path.join(path, 'train.txt')
23-
self.test = os.path.join(path, 'test.txt')
2422

2523
def get_data(self, path, batch_size=20):
2624
# Add words to the dictionary
@@ -43,4 +41,4 @@ def get_data(self, path, batch_size=20):
4341
token += 1
4442
num_batches = ids.size(0) // batch_size
4543
ids = ids[:num_batches*batch_size]
46-
return ids.view(batch_size, -1)
44+
return ids.view(batch_size, -1)

0 commit comments

Comments
 (0)