class_docstr: Score based on relation similarity.
  
  ---
  name: Soft Inverse Triple Baseline
  citation:
      author: Berrendorf
      year: 2021
      link: https://github.com/pykeen/pykeen/pull/543
      github: pykeen/pykeen
code: def score_t(
      self, hr_batch: torch.LongTensor, **kwargs
  ) -> torch.FloatTensor:  # noqa: D102
      r = hr_batch[:, 1]
      scores = (
          self.sim[r, :] @ self.rel_to_tail
          + self.sim_inv[r, :] @ self.rel_to_head
      )
      scores = numpy.asarray(scores.todense())
      return torch.from_numpy(scores)
  
imports: from typing import Optional
  import numpy
  import torch
  from .utils import get_csr_matrix, get_relation_similarity, marginal_score
  from ..base import Model
  from ...triples import CoreTriplesFactory
  from ...typing import InductiveMode
label_desc: Use image node_id 2 for calling the SoftInverseTripleBaseline obj's underlying member method code with example usage: obj.score_t(hr_batch) and returns: torch