def score_hrt(self, hrt_batch: torch.LongTensor) -> torch.FloatTensor:
    h = self.entity_embeddings(hrt_batch[:, 0]).view((- 1), self.embedding_dim)
    r = self.relation_embeddings(hrt_batch[:, 1]).view((- 1), self.embedding_dim)
    t = self.entity_embeddings(hrt_batch[:, 2])
    self.regularize_if_necessary(h, r, t)
    x_s = torch.cat([h, r], dim=(- 1))
    x_s = self.input_dropout(x_s)
    x_t = self.mlp(x_s)
    x = (x_t.view((- 1), self.embedding_dim) * t).sum(dim=1, keepdim=True)
    return x
def score_hrt(self, hrt_batch: torch.LongTensor) -> torch.FloatTensor:
    h = self.entity_embeddings(hrt_batch[:, 0]).view((- 1), self.embedding_dim)
    r = self.relation_embeddings(hrt_batch[:, 1]).view((- 1), self.embedding_dim)
    t = self.entity_embeddings(hrt_batch[:, 2])
    self.regularize_if_necessary(h, r, t)
    x_s = torch.cat([h, r], dim=(- 1))
    x_s = self.input_dropout(x_s)
    x_t = self.mlp(x_s)
    x = (x_t.view((- 1), self.embedding_dim) * t).sum(dim=1, keepdim=True)
    return x