"examples/vscode:/vscode.git/clone" did not exist on "b377e1b9c137f3cb6086d755c40e138163755c76"
Commit cc85d411 authored by Stephen Roller's avatar Stephen Roller Committed by Myle Ott
Browse files

Fix a bug with using GloVe 840B tokens for initialization.

parent 9dcee4c7
......@@ -256,7 +256,7 @@ def parse_embedding(embed_path):
with open(embed_path) as f_embed:
next(f_embed) # skip header
for line in f_embed:
pieces = line.strip().split()
pieces = line.rstrip().split(" ")
embed_dict[pieces[0]] = torch.Tensor([float(weight) for weight in pieces[1:]])
return embed_dict
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment