Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

why only update tail entities?Is there an error here #41

Open
jweihe opened this issue Apr 10, 2022 · 0 comments
Open

why only update tail entities?Is there an error here #41

jweihe opened this issue Apr 10, 2022 · 0 comments

Comments

@jweihe
Copy link

jweihe commented Apr 10, 2022

` mask_indices = torch.unique(batch_inputs[:, 2]).cuda()
mask = torch.zeros(self.entity_embeddings.shape[0]).cuda()
mask[mask_indices] = 1.0

    entities_upgraded = self.entity_embeddings.mm(self.W_entities)
    out_entity_1 = entities_upgraded + \
        mask.unsqueeze(-1).expand_as(out_entity_1) * out_entity_1

`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant