Skip to content
Snippets Groups Projects
Commit 66d4667d authored by Caroline DE POURTALES's avatar Caroline DE POURTALES
Browse files

update done

parent eff2f26e
No related branches found
No related tags found
3 merge requests!6Linker with transformer,!5Linker with transformer,!2Change preprocess
......@@ -371,6 +371,7 @@ class Linker(Module):
:return:
"""
return torch.stack([torch.stack([bsd_tensor.select(0, index=i).select(0,index=int(atom))
if atom != -1 else torch.zeros(self.dim_embedding_atoms) for atom in sentence])
for i, sentence in enumerate(positional_ids[:, atom_map_redux[atom_type], :])])
return torch.stack([torch.stack([bsd_tensor.select(0, index=i).select(0, index=int(atom)).to(self.device)
if atom != -1 else torch.zeros(self.dim_embedding_atoms, device=self.device)
for atom in sentence])
for i, sentence in enumerate(positional_ids[:, atom_map_redux[atom_type], :])])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment