Skip to content

Commit d7b527c

Browse files
committed
clean _strict_negative() in KnowledgeGraphCompletionExt
1 parent fe238e2 commit d7b527c

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

nbfnet/task.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ def target(self, batch):
5757
# in case of GPU OOM
5858
return mask, target, relation.cpu()
5959

60-
@torch.no_grad()
61-
def _strict_negative(self, pos_h_index, pos_t_index, pos_r_index):
62-
if not self.heterogeneous:
63-
return super(KnowledgeGraphCompletionExt, self)._strict_negative(pos_h_index, pos_t_index, pos_r_index)
64-
6560
def evaluate(self, pred, target):
6661
mask, target, relation = target
6762

0 commit comments

Comments
 (0)