Skip to content
Snippets Groups Projects
Commit 47b8f6fa authored by kreuzer's avatar kreuzer
Browse files

Aktualisieren structures.py

parent 4879fd5c
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,8 @@ class PreprocessedDataSet:
self.length_list[i] = self.length_list[i-1] + self.length_list[i]
elif dataset != None and model_gensim != None and nlp != None:
self.path = path
self.path.mkdir()
......@@ -128,12 +130,14 @@ class PreprocessedDataSet:
return dp
def compute_sent_vecs(self, model):
def compute_sent_vecs(self, model, path):
path = pathlib.Path(path)
path.mkdir()
for i in range(self.length):
dp = self.__getitem__(i)
dp.compute_sent_vecs(model)
torch.save(dp, self.path/str(i))
torch.save(dp, path/str(i))
# Shorten dataset for testing
def first(self, k):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment